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: Add notice if viewing outdated versions of the spec #862

Merged
merged 1 commit into from
May 17, 2023

Conversation

ianlewis
Copy link
Member

@ianlewis ianlewis commented May 16, 2023

When viewing older versions of the spec, this PR adds a notice at the top of pages linking them to the corresponding page in the newest version of the spec (or the top page if the page doesn't exist).

Also removes older "Note about 0.x versions" which referenced v1.0 before it was released. Removed because notices at the top of the page should supersede them.

@netlify
Copy link

netlify bot commented May 16, 2023

Deploy Preview for slsa canceled.

Name Link
🔨 Latest commit 7ffa5f3
🔍 Latest deploy log https://app.netlify.com/sites/slsa/deploys/6463be3a6e2ca60008c0fc0d

@ianlewis ianlewis force-pushed the version-warning branch 4 times, most recently from 776079e to 539b15d Compare May 16, 2023 06:32
@ianlewis ianlewis marked this pull request as ready for review May 16, 2023 06:34
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

Thanks for proposing this @ianlewis! I think this is a great addition.
I wonder if we would be better off using the styling, and perhaps mechanism, of the existing "working draft" banner?

<input id="important-messages-checkbox" type="checkbox" hidden>

We could use the same styling and mechanism but with a different message if status is retired vs. draft?

docs/_data/versions.yml Outdated Show resolved Hide resolved
docs/_data/versions.yml Outdated Show resolved Hide resolved
docs/_data/versions.yml Outdated Show resolved Hide resolved
@ianlewis
Copy link
Member Author

Thanks for proposing this @ianlewis! I think this is a great addition. I wonder if we would be better off using the styling, and perhaps mechanism, of the existing "working draft" banner?

<input id="important-messages-checkbox" type="checkbox" hidden>

We could use the same styling and mechanism but with a different message if status is retired vs. draft?

I redid the message to use this and allowed both the draft and new version message to be dismissed separately. I also updated the versions data to be a list rather than an object so it could be ordered.

docs/_includes/old-version-warning.html Outdated Show resolved Hide resolved
docs/_includes/old-version-warning.html Outdated Show resolved Hide resolved
docs/_data/versions.yml Show resolved Hide resolved
@ianlewis
Copy link
Member Author

data.versions was redone again to use the added current field.

docs/_data/versions.yml Show resolved Hide resolved
docs/_includes/header.html Outdated Show resolved Hide resolved
docs/_includes/header.html Show resolved Hide resolved
Copy link
Member

@MarkLodato MarkLodato left a comment

Choose a reason for hiding this comment

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

Thanks, Ian1

docs/_data/versions.yml Outdated Show resolved Hide resolved
Copy link
Member

@MarkLodato MarkLodato left a comment

Choose a reason for hiding this comment

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

Thanks, Ian!

@ianlewis
Copy link
Member Author

@joshuagl PTAL. I think I need your approval to merge.

of pages linking them to the corresponding page in the newest version of
the spec (or the top page if the page doesn't exist).

Also removes older "Note about 0.x versions" which referenced v1.0
before it was released. Removed because notices at the top of the page
should supersede them.

Co-authored-by: Joshua Lock <joshuagloe@gmail.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

Looks great, thanks Ian!

@joshuagl joshuagl merged commit ca2d4e9 into slsa-framework:main May 17, 2023
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