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

Used ThemeProvider for fontSize #81

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Saksham294
Copy link

With reference to the PR #58
I have used MUI sx props for styling the "Sounds of the Salish Sea" section of the Learn page.

@netlify
Copy link

netlify bot commented Mar 18, 2022

Deploy Preview for orcahome ready!

Name Link
🔨 Latest commit 16c1aaf
🔍 Latest deploy log https://app.netlify.com/sites/orcahome/deploys/623b259c1e2adb00083274ca
😎 Deploy Preview https://deploy-preview-81--orcahome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@paulcretu paulcretu left a comment

Choose a reason for hiding this comment

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

@Saksham294 thanks for the changes! Left you some comments. Also it looks like CI is failing, take a look at the checks. You should probably run npm run lint and npm run format, also make sure you've done npm install because it seems like you might not have all husky and lint-staged installed

src/pages/learn.jsx Outdated Show resolved Hide resolved
src/styles/Learn.module.css Outdated Show resolved Hide resolved
@Saksham294
Copy link
Author

@Saksham294 thanks for the changes! Left you some comments. Also it looks like CI is failing, take a look at the checks. You should probably run npm run lint and npm run format, also make sure you've done npm install because it seems like you might not have all husky and lint-staged installed

I did "npm install' and it stated "husky-git hooks installed, changed 3 packages" . However I didn't understand what went wrong. Like I just updated files : learn.jsx,theme.ts,Learn.module.css. There was nothing related to lint, format or husky files. I also don't know anything about these files.
So I don't know if my code will now pass the checks. Can you help me please?

@paulcretu
Copy link
Member

You probably started working on this feature using an old version of the project, before I set up husky. Husky + lint-staged automatically runs lint and format when you make a git commit, and will reject it if anything is wrong (you can read about it here). When you merged in the new code, if you didn't run npm install, husky and lint-staged wouldn't have been installed, so your code didn't get formatted and linted.

So to fix it, you should run npm install, and then do npm run format and npm run lint. Those commands should make some formatting fixes to your files, which you will then need to commit and push to this PR.

Also, as an extra tip, if you're using VS Code, take a look at the .vscode folder. In there, there's a file named settings.default.json. If you rename/copy that into settings.json (put it in that same folder), VS Code will automatically run lint + format every time you save a file, so you never have to worry about it.

@Saksham294
Copy link
Author

I think now it is fine. Can you check? Thanks a lot for all the support

@paulcretu paulcretu self-requested a review March 19, 2022 19:36
Copy link
Member

@paulcretu paulcretu left a comment

Choose a reason for hiding this comment

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

The checks look good, thanks for the changes! Looks like you removed settings.default.json, I re-added it (others will want it too). Also if you're not using a CSS class, might as well remove it. I went ahead and just made the changes because they're minor. However, I don't think this is ready to merge yet, left you some more comments

src/pages/learn.jsx Outdated Show resolved Hide resolved
src/pages/learn.jsx Outdated Show resolved Hide resolved
src/pages/learn.jsx Outdated Show resolved Hide resolved
Comment on lines 32 to 41
h1: {
fontFamily: 'Mukta',
fontSize: '40px',
fontWeight: '600',
},
body1: {
fontFamily: 'Montserrat',
fontSize: '20px',
fontWeight: '600',
},
Copy link
Member

@paulcretu paulcretu Mar 19, 2022

Choose a reason for hiding this comment

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

I think these font sizes are way too large. Just take a look at the designs
image

vs how this PR looks on my screen
image

I think we should probably just leave this as it was before because it was close enough, and we can make these kind of adjustments later on (changing the font sizes here changes it for the entire site)

Copy link
Author

Choose a reason for hiding this comment

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

I used the Container component and put the entire section within that container. Here's an image of the same, is it fine?
Screenshot 2022-03-20 at 3 28 14 PM

Copy link
Author

Choose a reason for hiding this comment

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

Though the design is a bit different from the one on the Figma page. Earlier I tried to match values of the styles as mentioned on the Figma design page.Like margin of the paragraph from the image was 'x' px on the Figma design so I copied the same. But it looks different with this PR as you mentioned above.

Copy link
Author

Choose a reason for hiding this comment

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

The section size is not like before, it is somewhat smaller in my opinion, while using the Container component. I don't know if it is optimum . I put the header, paragraph and the image inside one single Container component. I tried using the maxWidth and sx props of the Container component but no success. Am I doing something wrong?

Copy link
Author

Choose a reason for hiding this comment

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

Screenshot 2022-03-23 at 4 10 56 PM

I wrapped this section in a Container component and added individual font sizes for the text using the sx prop(removed the fontSize from the theme.ts file). I think the size is small even though I used the maxWidth="xl". I also removed marginLeft from Box components and applied it to just the Container component. Can you check if it is fine now?

src/pages/learn.jsx Outdated Show resolved Hide resolved
@UXBrendan
Copy link

@Saksham294

UI checks pass. Does this PR also cover the interactive graphic? If so, please link "Sounds of the Salish Sea" to this URL: https://orcasound.net/ed/booth/local.html?learn

@UXBrendan
Copy link

@Saksham294

We are going to deploy all passed PRs this Tuesday. Would it be possible for you to pass this PR so it's ready for our deployment session on Tuesday, Oct. 17?

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