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

fix: restore logo to footer #1761

Merged
merged 7 commits into from
Jun 19, 2024
Merged

fix: restore logo to footer #1761

merged 7 commits into from
Jun 19, 2024

Conversation

aqandrew
Copy link
Member

@aqandrew aqandrew commented Jun 11, 2024

Fixes #1750

  • Up to date with main branch
  • Branch name follows guidelines
  • All PR Status checks are successful
  • Peer reviewed and approved

Modifies the linebreaking behavior of the footer text on smaller screens. The original footer text, with lots of   entities between each text item, would break to new lines whenever the viewport isn't wide enough (this occurred in LastUpdated too). Also placement/amount of  s was inconsistent, and they made the source code difficult to read. The new text layout:

  • defines strings in a new variable footerItems, which gets spaces replaced with non-breaking spaces in JSX so that footer text is easier to read when it needs to be updated
  • uses MUI spacing tokens to enforce consistent gaps between text, | separators, and the logo

Is it the case that we only support large screens? If so, is this new linebreaking behavior acceptable?

screenshot of Figma (from issue description) Figma screenshot

Footer's responsive behavior after first commit

Screen.Recording.2024-06-11.at.4.20.51.PM.mov

Footer's responsive behavior after refactoring

Screen.Recording.2024-06-11.at.4.22.18.PM.mov

@aqandrew aqandrew requested a review from ryanfchase June 11, 2024 23:50
@aqandrew aqandrew requested a review from Skydodle June 12, 2024 13:50
@aqandrew aqandrew changed the title feat: restore logo to footer fix: restore logo to footer Jun 12, 2024
@DrAcula27 DrAcula27 self-requested a review June 13, 2024 02:46
@DrAcula27
Copy link
Member

ETA for review: 14 June 2024

Copy link
Member

@Skydodle Skydodle left a comment

Choose a reason for hiding this comment

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

Reviewed:

  • Pulled down and visually tested on browser. HFLA logo was restored as shown in video.
  • Great idea with adding the util functions. They significantly enhance readability by eliminating the clutter of multiple   entities, which can otherwise cause text to break awkwardly on narrow viewports like you mentioned.

As far as I know, we don't have a policy on responsiveness in design or dev yet, but I believe it's an important direction for us to consider. @ryanfchase might have more insights or corrections. However, the current PR's responsive behavior looks good to me.

@Skydodle
Copy link
Member

@ryanfchase @aqandrew We should also consider if we want to apply this implementation to the rest of the codebase, by refactoring   entities with using the toNonBreakingSpaces util function.

If we do want to, what would be the most efficient way to do it?

  1. Make it one big ticket specifically for one dev to focus on this? OR
  2. Break them down into separate tickets by UI components (ie. footer section, filter section.. etc.)? OR
  3. Dont make specific tickets for it, just embed it as an actionable checkbox on all future frontend tickets.

Copy link
Member

@ryanfchase ryanfchase left a comment

Choose a reason for hiding this comment

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

I've never used gap and inline-margin before, those seem useful. I assume you could also just do margin-left, but inline-margin maybe implies that we want to add this buffer space between this element and the element "before it".

Or maybe it's not that complicated, approved!

Copy link
Member

@DrAcula27 DrAcula27 left a comment

Choose a reason for hiding this comment

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

@aqandrew Great job on this issue, especially going above and beyond!

  • PR done on correct branch
  • PR linked to correct issue
  • PR does more than just fix the issue, it goes a step further and considers responsiveness
  • The Figma screenshot links to a blank page for me
  • Logo is imported correctly from the existing assets folder

The only question I have is regarding the removal of the //TODO comment. Since it was asking about re-adding privacy policy statements, should that comment be added back in?
Otherwise, great job, approved!

@Skydodle
Copy link
Member

@aqandrew Great job on this issue, especially going above and beyond!

  • PR done on correct branch
  • PR linked to correct issue
  • PR does more than just fix the issue, it goes a step further and considers responsiveness
  • The Figma screenshot links to a blank page for me
  • Logo is imported correctly from the existing assets folder

The only question I have is regarding the removal of the //TODO comment. Since it was asking about re-adding privacy policy statements, should that comment be added back in? Otherwise, great job, approved!

@DrAcula27 Chimming in regarding the TODO comment, we are all good on removing it as those TODOs has been completed probably more than a year ago. That comment is very old 😃

@ryanfchase
Copy link
Member

@ryanfchase @aqandrew We should also consider if we want to apply this implementation to the rest of the codebase, by refactoring   entities with using the toNonBreakingSpaces util function.

If we do want to, what would be the most efficient way to do it?

  1. Make it one big ticket specifically for one dev to focus on this? OR
  2. Break them down into separate tickets by UI components (ie. footer section, filter section.. etc.)? OR
  3. Dont make specific tickets for it, just embed it as an actionable checkbox on all future frontend tickets.

I've added this to the agenda for next week. I guess if I personally had to pick, it would be reaaaaaaally boring to go through the project and convert all instances of it. Even as Good First Issue tickets... I'd rather we embed this as an actionable checkbox on all future frontend tickets.

@ryanfchase
Copy link
Member

@aqandrew regarding your question...

Is it the case that we only support large screens? If so, is this new linebreaking behavior acceptable?

Yes, just large screens at the moment. I actually am not seeing what problems we might run into for the new linebreaking behavior, could you point out an example?

@ryanfchase
Copy link
Member

@aqandrew Great job on this issue, especially going above and beyond!

  • PR done on correct branch
  • PR linked to correct issue
  • PR does more than just fix the issue, it goes a step further and considers responsiveness
  • The Figma screenshot links to a blank page for me
  • Logo is imported correctly from the existing assets folder

The only question I have is regarding the removal of the //TODO comment. Since it was asking about re-adding privacy policy statements, should that comment be added back in? Otherwise, great job, approved!

@DrAcula27 the link is indeed broken here, but it is working on the original issue #1750 !

@ryanfchase
Copy link
Member

@aqandrew regarding your question...

Is it the case that we only support large screens? If so, is this new linebreaking behavior acceptable?

Yes, just large screens at the moment. I actually am not seeing what problems we might run into for the new linebreaking behavior, could you point out an example?

Sorry, I was rushing and forgot what you wrote earlier. If the new behavior is what you outlined at the beginning of your PR description, then yes. This new behavior is acceptable, thank you!

@aqandrew
Copy link
Member Author

@ryanfchase Yes, gap and margin-inline are very useful. Margin-inline adds a margin on both the left and right sides, so that there's enough spacing on the logo's right side when the screen is small enough for the logo to press up next to the Data last updated ... text (see 2nd video).

@DrAcula27 I removed that TODO because the footer elements currently do follow the order that Design specified in Figma, so it's already done. Thank you for confirming @Skydodle!

Off-topic: refactoring non-breaking spaces in the rest of the codebase won't be a heavy lift. Once this PR is merged,   only appears in 5 other files; the toNonBreakingSpaces function isn't even necessary there--partly because readability isn't particularly impacted, but also because non-breaking spaces aren't quite necessary either:

  • 3 of them are in the filter modal, separating labels from ArrowToolTip. AFAIK the layout doesn't cause that text to wrap, so we can just replace them with {' '}.
  • In About.jsx, it's being used to prevent orphan text. We can achieve this with text-wrap: pretty instead.
  • The last occurrences are in MapOverview.jsx, which is currently not shown in our UI (it was commented out 4 years ago). These might actually be a good use case for non-breaking spaces, but maybe we can wait until we want to uncomment that component

@aqandrew aqandrew merged commit 48e90a8 into main Jun 19, 2024
@aqandrew aqandrew deleted the 1750-footer-logo branch June 19, 2024 19:41
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.

Restore missing H4LA logo from the footer
4 participants