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

Example pages show incorrect revision date #255

Closed
ZoeBijl opened this issue Sep 7, 2023 · 4 comments
Closed

Example pages show incorrect revision date #255

ZoeBijl opened this issue Sep 7, 2023 · 4 comments
Labels
bug Something isn't working Infrastructure

Comments

@ZoeBijl
Copy link

ZoeBijl commented Sep 7, 2023

When you run node ./scripts/pre-build (to generate the pages?) all the “Page last updated” lines are updated in the examples/*.md files. This causes git status to be filled with 58 changes; this is quite confusing when it comes to contributing (especially for the first time).

My steps:

  1. Checkout this repo
  2. Follow “Local development” from the readme for the first time
  3. Be a little overwhelmed by all the changes I didn’t make popping up in git status
git status shows a long list of modifications generated by the script rather than the user

Is there another time/way this date update could be done?

@mcking65
Copy link
Contributor

We don't expect anyone to contribute to this repo. It is for builds only.

@alice
Copy link

alice commented Sep 14, 2023

I just took a quick look at this because my curiosity was piqued.

It looks like whatever process is running to generate the bot commits is updating every single example page to have a last updated date of whatever the current date is when the bot is run, rather than correctly getting the date the source example was last updated.

For example, the most recent bot commit on 2 September updates alertdialog.md to have a "Page last updated" date of 2 Sepember 2023, from a previous value of 29 August 2023 which was also set incorrectly by the bot.

Running the script locally correctly edits that value to be 8 December 2022, reflecting the actual last update of the source file.

This is causing the live examples to all have incorrect "Page last updated" sections in the footer; currently they're all showing as "8 August 2023" (see, again, the live page for the Alert Dialog Pattern example).

Fixing whatever issue is causing the dates to be incorrectly set by the bot updates would fix both the issue Zoë is having (regardless of whether someone wants to commit to this repository, they may want to do a local build in order to see their changes to the aria-practices repo in context, and it's not a nice experience to see a bunch of irrelevant files changed), and the issue of examples having incorrect last updated timestamps.

@mcking65
Copy link
Contributor

@alice

Thank you for looking into this. Your observations are useful. We have an issue that is partially related to the incorrect dates (#87). However, it is unnecessarily tangled up with an issue related to acknowledgements.

@ZoeBijl, I'm convinced that we should address this to at least ensure the last revised info shown on each page is accurate.

Unfortunately, the revision dates won't help people know when the last substantive revision was. For that, they will still have to dig into the git logs. When we redesign the footer, I want to make it easier to access the revision history. Unfortunately, that is pretty complex for the example pages because you also need to surface the revision history of the js, css, and image files.

@mcking65 mcking65 changed the title Date update during pre-build makes committing harder Example pages show incorrect revision date Sep 19, 2023
@mcking65 mcking65 added bug Something isn't working Infrastructure labels Sep 19, 2023
mcking65 pushed a commit to w3c/aria-practices that referenced this issue Dec 12, 2023
… example pages (Related to wai-aria-practices issue 255) (pull #2883)

Each example page has a list of CSS and JS files used by the sourceCode function in shared/js/examples.js. Three examples had errors in this list that are corrected by this commit. This fix supports resolution of w3c/wai-aria-practices#255, which is related to incorrect last revision dates being shown in the footer of example pages.
@ccanash
Copy link
Contributor

ccanash commented Jan 24, 2024

Hi @mcking65 this was released in mid December. I have updated our project board.

@ccanash ccanash closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants