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 versioning to argocd docs #5099

Merged
merged 2 commits into from
Feb 4, 2021
Merged

Conversation

reginapizza
Copy link
Contributor

@reginapizza reginapizza commented Dec 21, 2020

This PR is to add versioning to the Argo CD docs. The core functionality of this versioning is done through mike. Related to issue #5031.

Additional functionality:

  • if the user is on version of the docs NOT called "latest", they get an a warning message (seen below) that will provide a link to the most current docs.
  • if the user clicks on a link where version is not specified in the URL, they will be redirected to the latest version of the docs.

Screenshots:
argocddocs-latest
argocddocs-olderversion

output.mp4

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • My build is green (troubleshooting builds).

@reginapizza reginapizza changed the title enhancement: add versioning to argocd docs feat: add versioning to argocd docs Dec 21, 2020
@jannfis jannfis self-assigned this Dec 22, 2020
@jannfis jannfis self-requested a review December 22, 2020 09:22
@jannfis jannfis removed their assignment Dec 22, 2020
@alexmt
Copy link
Collaborator

alexmt commented Jan 4, 2021

Thank you for implementing the version selector and banner! The only concern I have is the maturity of mike and maintenance overhead.

I want to propose to use https://readthedocs.org/ instead of mike. It automates version management and supports mkdocs .
We did not know how to add a version selector before. I was inspired by your PR and implemented it for argocd-notifications docs

image

What do you think? @reginapizza

@alexmt
Copy link
Collaborator

alexmt commented Jan 4, 2021

Changes in argocd-notifications still don't have banner that notifies users about the latest version. We could use code implemented in this PR to add it. https://readthedocs.org/ inject information about current version into READTHEDOCS_DATA.version global javascript variable.

If you like the idea to use https://readthedocs.org/ I would suggest implement banner in argocd-notifications and then we can re-use this JS file in argocd and argocd-image-updater.

@codecov-io
Copy link

codecov-io commented Feb 3, 2021

Codecov Report

Merging #5099 (95f5991) into master (9bf7ae3) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5099   +/-   ##
=======================================
  Coverage   40.91%   40.92%           
=======================================
  Files         137      137           
  Lines       18594    18597    +3     
=======================================
+ Hits         7608     7611    +3     
  Misses       9899     9899           
  Partials     1087     1087           
Impacted Files Coverage Δ
server/badge/badge.go 84.28% <0.00%> (+0.22%) ⬆️
util/session/sessionmanager.go 69.60% <0.00%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9bf7ae3...95f5991. Read the comment docs.

@reginapizza reginapizza force-pushed the regina-dev branch 6 times, most recently from 56c04ee to d0c5b9e Compare February 3, 2021 14:00
Signed-off-by: Regina Scott <rescott@redhat.com>
@reginapizza
Copy link
Contributor Author

Hey @alexmt ! This should be good now, but in order to move it to the argocd project the project name in versions.js will just need to be changed out of my project, unless you want to keep it there since I made you a maintainer of it anyway. Up to you.

Here are screenshots of it, but you can also see it in action here.
argocd-docsversioning
argocd-docsversioning2

@jannfis
Copy link
Member

jannfis commented Feb 3, 2021

Hey, this really awesome @reginapizza! I really like how you integrated the versions in the top bar, instead of having the default black float of RTD. And the banner is awesome, too.

I have one minor request for change: Since we want to redirect the user to the current stable version of the documentation by default (latest may contain information about yet unreleased stuff), we should IMHO change the logic to display the banner if the selected version is not stable. And maybe change the banner for latest version to reflect that some of the information in the documentation might not yet be released.

I also wonder if it is possible to find out which version of the docs in RTD corresponds to stable programmatically, and if a user selects the specific version, will not display the banner?

@reginapizza
Copy link
Contributor Author

@jannfis Thank you! Regarding your requests,

we should IMHO change the logic to display the banner if the selected version is not stable. And maybe change the banner for latest version to reflect that some of the information in the documentation might not yet be released.

I can totally do this no problem. There is a setting you change (see below) in RTD project settings and I can easily change the default version to stable. I can also change the link so that it redirects from other versions to stable, and I can add a banner to warn the user when they are on latest branch that information might not yet be released.

if it is possible to find out which version of the docs in RTD corresponds to stable programmatically, and if a user selects the specific version, will not display the banner?

I'm not sure about this though... this what RTD gives you to work with, I don't think that I can have an alias for anything besides "latest", but I'm not positive. I can try to look into it, unless @alexmt knows?
RTDsettings

@alexmt
Copy link
Collaborator

alexmt commented Feb 3, 2021

That looks awesome @reginapizza! Thank you!

Agree with @jannfis comment. We should assume default version is stable. I've tried to find if RTD inject value of default version but looks like this is not available. I think it is ok if we just hardcode stable in javascript

Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Regina Scott <rescott@redhat.com>
@alexmt alexmt merged commit c160a71 into argoproj:master Feb 4, 2021
@jannfis
Copy link
Member

jannfis commented Feb 4, 2021

🎉

Can we cherry-pick this into 1.8 branch, so we can already activate a 1.8 version of the docs in addition to master :)

I have re-configured RTD default branch to master, so latest version of RTD now points there.

@alexmt
Copy link
Collaborator

alexmt commented Feb 4, 2021

You are reading my minds :) doing it right now

alexmt pushed a commit that referenced this pull request Feb 4, 2021
* feat: add versioning to argocd docs

Signed-off-by: Regina Scott <rescott@redhat.com>

* make default branch stable, provide warning for latest

Signed-off-by: Regina Scott <rescott@redhat.com>
shubhamagarwal19 pushed a commit to shubhamagarwal19/argo-cd that referenced this pull request Apr 15, 2021
* feat: add versioning to argocd docs

Signed-off-by: Regina Scott <rescott@redhat.com>

* make default branch stable, provide warning for latest

Signed-off-by: Regina Scott <rescott@redhat.com>
@agilgur5 agilgur5 added documentation Issue is related to missing or incorrect documentation type:docs Missing or incomplete documentation labels Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issue is related to missing or incorrect documentation type:docs Missing or incomplete documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants