-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: [M3-6268] - MUI v5 Migration SRC > Features > Help
#9408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These pages were mostly looking good to me - there's one regression I noted below with the popular posts.
I also noticed a couple of styling fixes we could make here, optionally, because they're present in prod:
Add some spacing to the left side of the page at screen width959
on down - this feels unnecessarily tight.
Change the heading about the search bar ("What can we help you with?") from black text to white text. All the other section headings on the page are white and it seems odd that this is black; I don't remember if it has always been like this or if it is an intentional design choice (and if it is intentional, I am curious about the reason behind it).
@mjac0bs Both of your suggestions make sense and I went ahead and implemented them with my latest changes. Let me know how you feel about them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed the regression is fixed, thank you! White header text LGTM and I left one more comment on the spacing issue.
@@ -36,7 +36,7 @@ const StyledRootContainer = styled(Paper, { | |||
const StyledH1Header = styled(H1Header, { | |||
label: 'StyledH1Header', | |||
})(({ theme }) => ({ | |||
color: theme.color.white, | |||
color: 'white', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The white text looks better to me. Someday we'll fix our theme colors so that theme.color.white
is not black in dark mode. 😅
packages/manager/src/features/Help/SupportSearchLanding/SupportSearchLanding.tsx
Outdated
Show resolved
Hide resolved
@@ -34,7 +27,7 @@ export const H1Header = (props: H1HeaderProps) => { | |||
}} | |||
className={className} | |||
component={renderAsSecondary ? 'h2' : 'h1'} | |||
data-qa-header={dataQaEl ? dataQaEl : ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll probably want to keep the data-qa-header
attribute and its value the way it is since it's used a lot throughout the Cypress tests.
The general convention here is that the data-testid
attributes are used mainly by our Jest tests to select elements (e.g. via getByTestId
and similar React Testing Library helpers), whereas the data-qa-*
attributes are used mainly by our Cypress tests both to select elements and occasionally to use its value in some way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted this change and updated the test as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left comments to remove using usage of makeStyles for some components that have simple styles.
@@ -36,7 +36,7 @@ const StyledRootContainer = styled(Paper, { | |||
const StyledH1Header = styled(H1Header, { | |||
label: 'StyledH1Header', | |||
})(({ theme }) => ({ | |||
color: theme.color.white, | |||
color: theme.name === 'dark' ? theme.color.black : theme.color.white, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! @carrillo-erik Thanks making the changes.
* refactor: [M3-6268] - Apply previous work * Remove redundant index file * Add changeset * Fix issues from PR feedback * Implement new styling api and remove unused css * Styled components implementation * Convert class comp to funct comp and rewrite tests * Remove dead code from PR feedback * Fix error with search results * Debounce searchAlgolia func and minor clean up * Replace useMemo with useCallback * Remove old styles in favor of using sx prop * Replace old styles in favor of sx prop * Remove comments and default export
* refactor: [M3-6268] - Apply previous work * Remove redundant index file * Add changeset * Fix issues from PR feedback * Implement new styling api and remove unused css * Styled components implementation * Convert class comp to funct comp and rewrite tests * Remove dead code from PR feedback * Fix error with search results * Debounce searchAlgolia func and minor clean up * Replace useMemo with useCallback * Remove old styles in favor of using sx prop * Replace old styles in favor of sx prop * Remove comments and default export
* refactor: [M3-6268] - Apply previous work * Remove redundant index file * Add changeset * Fix issues from PR feedback * Implement new styling api and remove unused css * Styled components implementation * Convert class comp to funct comp and rewrite tests * Remove dead code from PR feedback * Fix error with search results * Debounce searchAlgolia func and minor clean up * Replace useMemo with useCallback * Remove old styles in favor of using sx prop * Replace old styles in favor of sx prop * Remove comments and default export
Description 📝
MUI v5 Migration for
SRC > Features > Help
Major Changes 🔄
tss-react
codemod onSRC > Features > Help
createStyles()
withmakeStyles()
andstyled()
APIHelpResources
file to match file name.How to test 🧪