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

Paul/FREYA-746 #1162

Merged
merged 10 commits into from
Aug 8, 2024
Merged

Paul/FREYA-746 #1162

merged 10 commits into from
Aug 8, 2024

Conversation

Ziip-dev
Copy link
Member

@Ziip-dev Ziip-dev commented Jul 22, 2024

  • Add last updated date to dashboard cards
  • Reorder dashboard cards by most recent update date
  • Add filter menu to the dashboard index page
  • Display the three most recently updated dashboards on the homepage
  • Display the three most recently updated dashboards on the topics pages

@Ziip-dev Ziip-dev added enhancement New feature or request WIP Work in progress labels Jul 22, 2024
@Ziip-dev Ziip-dev self-assigned this Jul 22, 2024
- Get dashboard file URL path in Hugo template
- Add a <div> element with the necessary paging classes
- Add a <span> element with an 'id' property to easily address the
  different dashboard cards
@Ziip-dev Ziip-dev force-pushed the Paul/FREYA-746 branch 3 times, most recently from 1abcd9d to 9d28a61 Compare July 23, 2024 10:12
@Ziip-dev Ziip-dev removed the WIP Work in progress label Jul 26, 2024
@Ziip-dev Ziip-dev requested a review from senthil10 July 26, 2024 15:22
@Ziip-dev Ziip-dev marked this pull request as ready for review July 26, 2024 15:24
@Ziip-dev
Copy link
Member Author

Just to make it clear, I remove the list of dashboards to be displayed in the homepage from the dashboard template.
So initially, all of the dashboards are displayed in the homepage and I added a condition at the end of the function processDashboardCards to only keep the three most recent one.

It's not super elegant, but this is the solution that required the least amount of modifications or special conditions... At the end it falls under the top banner short "flicker", so not more noticeable than that.

@Ziip-dev
Copy link
Member Author

Ziip-dev commented Aug 5, 2024

Same goes for the topic pages as the same script is used

This script:
- reads the EBI index json file from blobserver containing the dashboard data
- iterates over the dashboard cards in the HTML
- finds the matching entries in the EBI data
- handles special cases where there is no exact matching entry
- parses the retrieved corresponding data and write it in the dashboard card
@Ziip-dev Ziip-dev force-pushed the Paul/FREYA-746 branch 2 times, most recently from c914433 to e83a78b Compare August 7, 2024 09:50
@Ziip-dev
Copy link
Member Author

Ziip-dev commented Aug 7, 2024

All done @senthil10, if you want to give it one last final check

- Add date ordering logic to script.
This metadata defines if the dashboard page is either still regularly
updated or historic.
Copy link
Contributor

@senthil10 senthil10 left a comment

Choose a reason for hiding this comment

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

Great work, looks good to me. If @LianeHughes is also happy, it can be merged

Copy link
Collaborator

@LianeHughes LianeHughes 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. I made an update to the text on GU's dashboard (to make it consistent with KTH and to ensure that users are pointed to relevant data, as is also done elsewhere). I noticed that multi-disease is missing and some dates are incorrect. I assume that's because it requires the EBI file update?

If possible, the Swedish version titles for all, updating, and historic should be changed to 'allt' 'uppdaterad' and 'historisk'

@Ziip-dev
Copy link
Member Author

Ziip-dev commented Aug 8, 2024

Translation for filter labels added.
@LianeHughes I squashed your commit into the latest one for consistency of the git history once merged :)

@LianeHughes LianeHughes merged commit e9a5245 into develop Aug 8, 2024
3 checks passed
@LianeHughes LianeHughes deleted the Paul/FREYA-746 branch August 8, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants