Skip to content

Commit

Permalink
chore: Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Carvalho committed Aug 22, 2023
1 parent ac23acb commit cf9007a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pages/side-navigation/app-layout.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ const items: SideNavigationProps.Item[] = [
{
type: 'expandable-link-group',
text: 'Expandable link group',
href: '#/light/side-navigation/app-layout/?visualRefresh=false',
href: '#/exp-link-group-inner',
items: [
{
type: 'link',
text: 'Page 11',
href: '#/light/side-navigation/app-layout/?visualRefresh=false',
href: '#/page11',
},
{
type: 'link',
text: 'Page 12',
href: '#/light/side-navigation/app-layout/?visualRefresh=false',
href: '#/page12',
},
],
},
Expand Down
12 changes: 6 additions & 6 deletions src/app-layout/__tests__/mobile.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describeEachThemeAppLayout(true, theme => {
}
/>
);
// To guarantee an optimal UX on mobile, AppLyout forcely closes the navigation on the first load on mobile
// AppLayout forcely closes the navigation on the first load on mobile, so the main content is visible
expect(isDrawerClosed(wrapper.findNavigation())).toBe(true);
});

Expand All @@ -91,7 +91,7 @@ describeEachThemeAppLayout(true, theme => {
}
/>
);
// To guarantee an optimal UX on mobile, AppLyout forcely closes the navigation on the first load on mobile
// AppLayout forcely closes the navigation on the first load on mobile, so the main content is visible
expect(isDrawerClosed(wrapper.findNavigation())).toBe(true);
});

Expand Down Expand Up @@ -146,7 +146,7 @@ describeEachThemeAppLayout(true, theme => {
}
/>
);
// To guarantee an optimal UX on mobile, AppLyout forcely closes the navigation on the first load on mobile
// AppLayout forcely closes the navigation on the first load on mobile, so the main content is visible
expect(isDrawerClosed(wrapper.findNavigation())).toBe(true);

wrapper.findNavigationToggle().click();
Expand All @@ -173,7 +173,7 @@ describeEachThemeAppLayout(true, theme => {
}
/>
);
// To guarantee an optimal UX on mobile, AppLyout forcely closes the navigation on the first load on mobile
// AppLayout forcely closes the navigation on the first load on mobile, so the main content is visible
expect(isDrawerClosed(wrapper.findNavigation())).toBe(true);

wrapper.findNavigationToggle().click();
Expand All @@ -195,7 +195,7 @@ describeEachThemeAppLayout(true, theme => {
}
/>
);
// To guarantee an optimal UX on mobile, AppLyout forcely closes the navigation on the first load on mobile
// AppLayout forcely closes the navigation on the first load on mobile, so the main content is visible
expect(isDrawerClosed(wrapper.findNavigation())).toBe(true);

wrapper.findNavigationToggle().click();
Expand All @@ -217,7 +217,7 @@ describeEachThemeAppLayout(true, theme => {
}
/>
);
// To guarantee an optimal UX on mobile, AppLyout forcely closes the navigation on the first load on mobile
// AppLayout forcely closes the navigation on the first load on mobile, so the main content is visible
expect(isDrawerClosed(wrapper.findNavigation())).toBe(true);

wrapper.findNavigationToggle().click();
Expand Down
2 changes: 1 addition & 1 deletion src/app-layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const OldAppLayout = React.forwardRef(
};

useEffect(() => {
// To guarantee an optimal UX on mobile, we forcely close the navigation on this viewport
// Close navigation drawer on mobile so that the main content is visible
if (isMobile) {
onNavigationToggle(false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app-layout/visual-refresh/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export const AppLayoutInternalsProvider = React.forwardRef(
);

useEffect(() => {
// To guarantee an optimal UX on mobile, we forcely close the navigation on this viewport
// Close navigation drawer on mobile so that the main content is visible
if (isMobile) {
handleNavigationClick(false);
}
Expand Down

0 comments on commit cf9007a

Please sign in to comment.