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

fix: stay on page after version switch #679

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

farshidtz
Copy link
Member

@farshidtz farshidtz commented Jan 26, 2022

Related to #678

I believe this fixes the version switch only for version 2.2, when switching to any other version, but not vice versa.

Additional PRs would have to backport this fix into gh-pages. I guess the CI populates 2.2, 2.1, ... directories of gh-pages from main, jakarta, ... branches?

To validate that it works, I've tested it locally by switching to gh-pages branch and adding this fix in 2.1 and 2.2 directories. I've then served the files with a python http server:

python3 -m http.server

See the video below; note the swagger URL version change in the inspection area.

Signed-off-by: Farshid Tavakolizadeh farshid.tavakolizadeh@canonical.com

PR Checklist

Please check if your PR fulfills the following requirements:

  • Changes have been rendered and validated locally using mkdocs-material (see edgex-docs README)
version-switcher-fix-2.1-2.2.mp4

Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

Looks worth a try! May have issues when older version doesn't have the path.

@lenny-goodell lenny-goodell merged commit fdcd220 into edgexfoundry:main Jan 26, 2022
@farshidtz
Copy link
Member Author

farshidtz commented Jan 26, 2022

May have issues when older version doesn't have the path.

Yes, there would be a 404 error page. I think it's still better than throwing the user to home screen for all pages.

Thanks for the review and merge.

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.

2 participants