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

feat: Implement a modern footer #400

Merged
merged 12 commits into from
Apr 28, 2024
Merged

Conversation

mgax
Copy link
Contributor

@mgax mgax commented Apr 3, 2024

Fix #377

  • Move social media links from the header to the footer, in line with the existing links (which are now aligned to the right).
  • Add snippet type "Footer Column". The columns are displayed above social links and the old footer links.
  • On mobile, the columns are collapsed, and the headings are tagged with accessibility markup, to make them useful for screen readers.
  • A bit of code is shared with the test coverage branch (chore: Improve test coverage #395) but it should be easy to merge.

@mgax mgax changed the title Implement a modern footer feat: Implement a modern footer Apr 3, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 98.51852% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 83.87%. Comparing base (4ad3143) to head (4865217).
Report is 8 commits behind head on main.

Files Patch % Lines
ietf/utils/blocks.py 94.44% 1 Missing ⚠️
ietf/utils/models.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #400      +/-   ##
==========================================
+ Coverage   82.72%   83.87%   +1.15%     
==========================================
  Files         124      129       +5     
  Lines        2599     2710     +111     
==========================================
+ Hits         2150     2273     +123     
+ Misses        449      437      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@SharmaineLim SharmaineLim left a comment

Choose a reason for hiding this comment

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

Looking good :) I just have a few small comments.

[
("link", LinkBlock()),
],
blank=True,

Choose a reason for hiding this comment

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

[Minor] Should we be allowing a column with no links?

[Minor] Also, if there's a maximum number of columns supported by the design, we should mention it here as help text, and add a max_num field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH I'm not a fan of making body content mandatory. No content editor will create an empty column and it doesn't really break anything. It just makes testing more annoying. Also, each column is a different snippet, so there's no good way to enforce a limit. But again, the content editor can make a judgement call for the number of columns, taking into account the length of the titles and link texts, and using the preview to see what it looks like.

Comment on lines 15 to 20
<a
href="{{ link.value.url }}"
class="link-underline-opacity-0 link-light fw-semibold"
>
{{ link.value.text }}
</a>

Choose a reason for hiding this comment

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

[Minor] We might want to add more space between links on mobile so that it's not as easy to tap the wrong link.

[Accessibility] This text's colour contrast fails accessibility.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed!

show_in_menus=True,
) # type: ignore

def test_links(self):

Choose a reason for hiding this comment

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

[Nitpick] Please add some comments for the FE devs. :)

@mgax
Copy link
Contributor Author

mgax commented Apr 4, 2024

@SharmaineLim thanks! I'll mark the PR as "Ready for review" so that IETF have time to review it too.

@mgax mgax marked this pull request as ready for review April 4, 2024 11:32
@kesara kesara changed the base branch from main to feat/modern-footer April 23, 2024 21:08
@kesara kesara merged commit 0e379e7 into ietf-tools:feat/modern-footer Apr 28, 2024
1 check passed
@mgax mgax deleted the feat/footer branch April 29, 2024 09:23
@kesara kesara mentioned this pull request May 26, 2024
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.

implement a modern footer
4 participants