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

Show message in news.html if Central is out-of-date #855

Open
matthew-white opened this issue Dec 19, 2024 · 0 comments
Open

Show message in news.html if Central is out-of-date #855

matthew-white opened this issue Dec 19, 2024 · 0 comments
Labels
enhancement New feature or behavior

Comments

@matthew-white
Copy link
Member

Now that #774 is in place, an admin user on v2024.3 or later will be informed if their version of Central is out-of-date. This is done based on the year part of their Central version tag. For example, if a user is using v2024.3 in 2026 (2024 from v2024.3 + 2 years), they will see a message.

However, this will only happen for users on v2024.3 or later. If a user is on an earlier version, their version of Central won't have the new functionality to inform them about their version. One idea we discussed in #744 was to show a message in news.html if a user's version of Central is out-of-date. If we did that, we would be able to show a short message to users on a version earlier than v2024.3.

The only thing that would need to change for this is news.html. As part of #744, Central v2024.3 and later now pass the query parameter outdatedVersionWarning=false to news.html. news.html could look for this query parameter, and if it doesn't see it, show a message. We would modify news.html only once the last version before v2024.3 (i.e., v2024.2) is considered out-of-date enough to warrant messaging users. (In two releases? In a year?)

It'd be nice to be able to give users the ability to dismiss the message in news.html, as we did in #744. There are two things to consider along those lines:

  • Old versions of Central won't have user preferences, and even if they did, the iframe isn't able to send authenticated requests to Backend. If the user dismisses the message, we would need to persist that preference some other way (in local storage?).
  • news.html has limited styles. Because it's loaded separately from Frontend, we want to avoid downloading all our styles twice. Currently, news.html doesn't have styles for buttons.

Note that the size of the news iframe has varied over time:

  • Prior to v1.5, the iframe was the full width of the page.
  • From v1.5–v2023.5 (7 releases), the width of the iframe was 300px, due to Increase width of news iframe central-frontend#661.
  • Since v2024.1, the width of the iframe has been a little less than half the width of the page.
  • I think the height has been a consistent 40px. I also think the iframe will scroll if it doesn't fit within the 40px (not totally sure).

Given the limited size of the iframe, we should probably limit the length of the message that we show to users.

@matthew-white matthew-white added the enhancement New feature or behavior label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or behavior
Projects
None yet
Development

No branches or pull requests

1 participant