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

🚧 Responsive tables #934

Merged
merged 13 commits into from
Oct 28, 2024
Merged

🚧 Responsive tables #934

merged 13 commits into from
Oct 28, 2024

Conversation

mitchdawson1982
Copy link
Collaborator

@mitchdawson1982 mitchdawson1982 commented Oct 10, 2024

  • Makes tables on results details pages responsive when loaded in small resolutions via custom css
  • Utilises truncatewords_html to truncate descriptions to 25 words on linked items that can be clicked on to display the full description. This was because keeping the amount of text in the description fields relatively consistent improved the look and feel in the table view. {{ table.description|markdown:3|truncatewords_html:25 }}
  • I have removed the truncation of the description for tables as there is no other way to view the full description in this case.
  • Updates tests

@mitchdawson1982 mitchdawson1982 requested a review from a team as a code owner October 10, 2024 13:52
@mitchdawson1982 mitchdawson1982 marked this pull request as draft October 11, 2024 10:09
@mitchdawson1982 mitchdawson1982 changed the title Make tables scrollable in results Responsive tables Oct 11, 2024
@mitchdawson1982 mitchdawson1982 changed the title Responsive tables 🚧 Responsive tables (WIP) Oct 11, 2024
@mitchdawson1982 mitchdawson1982 force-pushed the fmd-915-make-tables-scrollable branch 2 times, most recently from bb96b7d to 283d614 Compare October 11, 2024 15:29
@mitchdawson1982 mitchdawson1982 force-pushed the fmd-915-make-tables-scrollable branch from 283d614 to 26f32e9 Compare October 14, 2024 09:01
@mitchdawson1982 mitchdawson1982 force-pushed the fmd-915-make-tables-scrollable branch from 4dff253 to fab5201 Compare October 14, 2024 15:44
@mitchdawson1982 mitchdawson1982 marked this pull request as ready for review October 14, 2024 15:46
@mitchdawson1982 mitchdawson1982 changed the title 🚧 Responsive tables (WIP) 🚧 Responsive tables Oct 14, 2024
@MatMoore
Copy link
Contributor

A couple of thoughts after coming back to this:

  1. In the block view, I think it might be useful for the column names to be followed by colons, just to make the names/values more distinct. That'll also make them consistent with how we've done the metadata items at the top of the page.
  2. We're currently switching to the block style at the tablet breakpoint. I think this makes sense (and if in doubt, I would go with what the NHS have done), but it's possible the normal table style would still work at that breakpoint and we could switch it at the mobile breakpoint instead. What do you think?

I think we should also run this by the accessibility team, since they pointed us towards this component originally.

@mitchdawson1982 mitchdawson1982 merged commit 13b69b1 into main Oct 28, 2024
11 checks passed
@mitchdawson1982 mitchdawson1982 deleted the fmd-915-make-tables-scrollable branch October 28, 2024 10:48
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