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

"These docs are out of date!" banner support for older docs pages #2432

Closed
rachelnabors opened this issue Mar 20, 2020 · 8 comments · Fixed by #2916
Closed

"These docs are out of date!" banner support for older docs pages #2432

rachelnabors opened this issue Mar 20, 2020 · 8 comments · Fixed by #2916
Labels
difficulty: intermediate Issues that are medium difficulty level, e.g. moderate refactoring with a clear test plan. feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. mlh Major League Hacking Fellowship

Comments

@rachelnabors
Copy link

🚀 Feature

A configurable banner that shows at the top of all versioned docs, directing people to the most recent page.

Have you read the Contributing Guidelines on issues?

Sure have :)

Motivation

On ReactNative.dev, 3.5% of traffic is to versioned docs. Sometimes search engines mess up (don't we all?) and show old pages to users looking for the most up-to-date information. Sometimes they don't even realize that they're looking at old information! Wouldn't be nice to let those 3.5% users know where they are and give them a link to the latest docs.

This is a technique other documentation sites take when they still want their older docs to be indexable and searchable, but they don't want users to be mislead!

Pitch

When a user visits a versioned doc, across the top of the page, show them a sticky banner that tells them:

  • they are viewing outdated information from VERSION
  • what the CURRENT_VERSION is
  • and links to the most recent page (if it exists)
@rachelnabors rachelnabors added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Mar 20, 2020
@lex111 lex111 added this to the v2.0.0-alpha.50 milestone Apr 1, 2020
@lex111 lex111 removed the status: needs triage This issue has not been triaged by maintainers label Apr 1, 2020
@lex111 lex111 removed this from the v2.0.0-alpha.51 milestone Apr 20, 2020
@yangshun yangshun added difficulty: intermediate Issues that are medium difficulty level, e.g. moderate refactoring with a clear test plan. mlh Major League Hacking Fellowship labels Jun 5, 2020
@anshulrgoyal
Copy link
Contributor

Instead of a banner, we can do this:-
image

image

Rust docs do the same.

@teikjun
Copy link
Contributor

teikjun commented Jun 9, 2020

@anshulrgoyal In the context of a docusaurus site, this is one possible layout:
image

@slorber
Copy link
Collaborator

slorber commented Jun 9, 2020

Having this in the docs layout could be a problem in some cases. For example a doc in v1 might be deleted/renamed in v2, so it's not possible to go to the same doc in v2.

This makes more sense to me if this is a global warning.
Sometimes a new version is a full rewrite of the whole code/doc.

@anshulrgoyal
Copy link
Contributor

Yeah it will be a global warning

@teikjun
Copy link
Contributor

teikjun commented Jun 9, 2020

@anshulrgoyal Alternatively, we can use a banner so it is clearer that it is a global warning

image

@anshulrgoyal
Copy link
Contributor

anshulrgoyal commented Jun 9, 2020

Banner

When the user clicks on banner it will take to /
Pros:

  • More predominantly visible on the page
  • Conveys a global warning
    Cons:
  • Maybe overwritten by the user setting
  • Duplication of version related information

Breadcrumbs

When the user clicks on breadcrumbs it will take to /
Pros:

  • looks cleaner
  • didn't hinder any other feature
    Cons:
  • May convey that the warning is not global

@yangshun
Copy link
Contributor

yangshun commented Jun 9, 2020

Prefer not to use a global warning because there's already the announcement bar. We don't want to have so many "announcements". Adding global UI items has already been a cause of layout pain because the navbar can be fixed (you can look at how much code @lex111 added to support the announcement bar) and I don't think we should contribute to it even further.

@anshulrgoyal
Copy link
Contributor

We will be moving forward with breadcrumbs option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: intermediate Issues that are medium difficulty level, e.g. moderate refactoring with a clear test plan. feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. mlh Major League Hacking Fellowship
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants