Skip to content
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

Nickakhmetov/HMP-349 / HMP-361 Update shared icons/links to use TS/MUI Styles #3255

Merged
merged 33 commits into from
Sep 19, 2023

Conversation

NickAkhmetov
Copy link
Collaborator

This PR adjusts the icons and links directories' components to be fully TypeScript compatible and enables the use of sx and other MUI props on the styled icons.

Styled icons still default to 1rem by default, and appearance matches prod.

* bump dependency versions

* Only use typescript rules with typescript files

* use nullish coalescer instead of ternary

* Prefer interfaces over types

* type the `groups` arg itself as LinkGroupType

* Fix `rest` props

* avoid unsafe assignment of `any` value by typing styled components

* update to prettier 3, update eslint prettier plugin accordingly

* rerun `lint:fix` after prettier 3 upgrade

* clean up unsafe assignment of `any` value

* type LinkButton as an anchor element

* fix remaining "unsafe color cast"

* add prettier as default yaml formatter

* add ignore paths for prettier, add prettier linting for md/json/yaml

* Fix parser settings in prettierrc, target all files in ingest-validation-tools

* apply upstream package.json changes

* changelog + fixed settings.json to properly identify "markdown" vs. "md"

* use `.ts` extension when exporting types

* NickAkhmetov/HMP-390 Apply `prettier` formatting to `md`, `json` and `yaml` files (#3250)

* Run `prettier write .`

* use `.ts` extension when exporting types

* Keep `eslint` calls confined to only eslint file types

* Revert html template changes, add to prettierignore

* Add plugins to let ESLint parse MD/JSON/YAML and hand them off to prettier for formatting

* `prettier --write .`

* Prettier fixes

* fix imports in tutorial cypress test
@NickAkhmetov NickAkhmetov requested a review from lchoy September 12, 2023 00:39
Base automatically changed from nickakhmetov/hmp-371-mui-palette-cleanup to main September 12, 2023 16:08
john-conroy
john-conroy previously approved these changes Sep 13, 2023
Copy link
Collaborator

@john-conroy john-conroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as is, but is there any way to cut down on the amount of boilerplate in icons.ts?

@NickAkhmetov
Copy link
Collaborator Author

cut down on the amount of boilerplate in icons.ts?

I'll look into how I can improve on this.

There are a lot of icons throughout the site which were dependent on the fontSize: 1rem rule to look right. I tried to apply this rule via the theme instead, but this ended up affecting the styling of the icons throughout the site that weren't imported from this icons directory and thus relied on the default 1.5rem medium size (e.g. the controls for the carousel and the icons in the header dropdown).

@NickAkhmetov NickAkhmetov merged commit 06c40af into main Sep 19, 2023
@NickAkhmetov NickAkhmetov deleted the nickakhmetov/hmp-349-icons-mui-5 branch September 19, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants