Skip to content

feat (frontend): add tailwind, shadcn & fonts#53

Merged
liangricky7 merged 9 commits intofrontendfrom
member-management
Oct 9, 2025
Merged

feat (frontend): add tailwind, shadcn & fonts#53
liangricky7 merged 9 commits intofrontendfrom
member-management

Conversation

@rachael-101906
Copy link
Contributor

Created tailwindcss configuration and added shadcn components such as a button and card

Copy link
Member

@DamienVesper DamienVesper left a comment

Choose a reason for hiding this comment

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

  • See below comments.
  • Try to run ESLint on the project before committing, to keep consistent style. Not a deal breaker, though, if you forget.

"@types/react": "^19.1.13",
"@types/react-dom": "^19.1.9",
"@vitejs/plugin-react": "^5.0.3",
"autoprefixer": "^10.4.21",
Copy link
Member

Choose a reason for hiding this comment

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

Tailwind doesn't need autoprefixer since v4.

If you are writing custom CSS and want autoprefixer to run on that, then you would have to remove @tailwindcss/vite, use @tailwindcss/postcss and add a postcss.config.js file. As it currently stands, postcss and autoprefixer do nothing.

"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.4.0",
"postcss": "^8.5.6",
Copy link
Member

Choose a reason for hiding this comment

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

Because you do not need autoprefixer, and tailwind is used as a Vite plugin, you will not need this package either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, thank you!

had autoprefixer and postcss in the package.json file, but forgot that tailwind v4 doesn't need that since we also don't need the postcss and tailwind.config files anymore
DamienVesper
DamienVesper previously approved these changes Oct 5, 2025
Copy link
Member

@DamienVesper DamienVesper left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@liangricky7 liangricky7 left a comment

Choose a reason for hiding this comment

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

Looks good, except just move your changes to App.tsx to a different file; I'll go in and make a react router in the next hour that can link to whichever page you want to have your test page on

I added the foundation for our custom fonts and colors in a new styles folder in the src folder, and tailored it to the design principles of the member portal in the index.css file.
Copy link
Contributor

@liangricky7 liangricky7 left a comment

Choose a reason for hiding this comment

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

  • take the styles folder out of assets; it should be its own folder
  • paste all of the content in App.tsx into some file in the pages folder since we need different content to be in App.tsx
  • in fonts.css, the Sora Font Family isn't properly imported; the font-family is "Manrope" for most, and the src is just not correct
  • We don't need static fonts if we have dynamic fonts; you can delete both static files

I added the input shadcn component and fixed the bugs from the previous pull request.
Copy link
Contributor

@liangricky7 liangricky7 left a comment

Choose a reason for hiding this comment

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

Are we going to use the dynamic fonts? if not, we can just delete them
If we are using static, for Sora, we only need the Regular and Bold, and for Manrope, Bold and ExtraBold

@rachael-101906
Copy link
Contributor Author

Are we going to use the dynamic fonts? if not, we can just delete them If we are using static, for Sora, we only need the Regular and Bold, and for Manrope, Bold and ExtraBold

I put them there just as options depending on design elements. We can delete them of course, but I just added them for possible integration. I only used Manrope Bold and SemiBold and Sora Regular on my own pages, but wasn't sure if we would decide differently on designs in the future.

…or typography

I took the fonts I uploaded from Google and deleted the ones we primarily aren't going to use. I then redefined them in fonts.css with their corresponding weights based on the figma design(s) so then I could create their specific classes and variants. I lastly moved the specific styles for the fonts into a separate file called typography.css and imported it into index.css.
Changed oklch value to match color palette
Copy link
Member

@DamienVesper DamienVesper left a comment

Choose a reason for hiding this comment

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

See comments.

@font-face {
font-family: "Sora";
src: url("/src/assets/fonts/Sora/static/Sora-Medium.ttf");
font-weight: 600;
Copy link
Member

Choose a reason for hiding this comment

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

Bold fonts should have a font weight of 700. If intending 600, use semibold.

https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-weight#common_weight_name_mapping

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ricky told me to use 600 for all of the bold fonts.

Copy link
Member

Choose a reason for hiding this comment

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

Should configure this in @layer base instead of applying to h1, h2, h3 directly.
The utility classes (.h1, .h2, .h3) should use @utility.

https://tailwindcss.com/docs/adding-custom-styles#adding-base-styles
https://tailwindcss.com/docs/adding-custom-styles#adding-custom-utilities

Copy link
Member

Choose a reason for hiding this comment

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

Bad merge from e943f77.

Copy link
Member

Choose a reason for hiding this comment

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

Mutually exclusive with static fonts.

Copy link
Member

Choose a reason for hiding this comment

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

Mutually exclusive with static fonts.

Deleted sora bold and re-added sora semibold to fit the desired 600 font weight
@liangricky7 liangricky7 merged commit 0f4abfd into frontend Oct 9, 2025
@DamienVesper DamienVesper changed the title Member management feat (frontend): add tailwind, shadcn & fonts Nov 12, 2025
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.

3 participants