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 links VS version in hub cards #288

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Apr 15, 2024

Question Answer
JIRA Ticket
Versions
Edition

Bug

Example:
https://doc.ibexa.co/projects/userguide/en/4.5/persona_paths/author_content/ "Edit image"
In persona_paths/author_content.md, content_management/edit_images/ refers to 4.5 file which doesn't exist on master or 4.6 (moved to image_management/edit_images/).

Solution Comparison

When on projects/userguide/en//persona_paths/author_content/
"✅ Yes": The "Edit images" link leads to the expected location.
"✔️ Yes, but…": The "Edit images" link works but leads to a less accurate location (change the server and/or the version). Weak links that break as soon as master differs from latest.
":x: No": The "Edit images" is broken.

branch+env none #271 #285 #287
latest Production ✅ Yes ✅ Yes ✅ Yes      ✅ Yes
4.5 Production ❌ No ❌ No ✅ Yes ✅ Yes
4.5 ReadTheDocs ❌ No ❌ No ✔️ Yes, but…. ✅ Yes
4.5 localhost ✅ Yes ✅ Yes. ❌ No ✅ Yes
master Production ✔️ Yes, but… ✔️ Yes, but… ✔️ Yes, but…   ✅ Yes
master ReadTheDocs ✔️ Yes, but… ❌ No ✔️ Yes, but… ✅ Yes
master localhost ✅ Yes ✅ Yes ✔️ Yes, but… ✅ Yes

"latest Prodution": https://doc.ibexa.co/projects/userguide/en/latest/persona_paths/author_content/
"4.5 Production": https://doc.ibexa.co/projects/userguide/en/4.5/persona_paths/author_content/
"master Production": https://doc.ibexa.co/projects/userguide/en/master/persona_paths/author_content/

"master ReadTheDocs": The preview of a pull request from master to master
"4.5 ReadTheDocs": The preview of a pull request from 4.5 branch to 4.5
"master localhost": The local run of mkdocs serve on branch master

Fix

#287 + #271

https://doc.ibexa.co/projects/userguide/en/4.5/persona_paths/author_content/ example:

  1. main.py: cards: get right version from abs_url #271: The HTML is generated with href="/projects/userguide/en/latest/content_management/edit_images"
  2. cards.js to fix links #287: card.js sees it as an internal link and replace it with href="/projects/userguide/en/4.5/content_management/edit_images"

https://ez-systems-developer-documentation--288.com.readthedocs.build/projects/userguide/en/288/persona_paths/author_content/

  1. main.py: cards: get right version from abs_url #271: The HTML is generated with href="/projects/userguide/en/latest/image_management/edit_images"
  2. cards.js to fix links #287: card.js sees it as an internal link and replace it with href="/projects/userguide/en/288/image_management/edit_images"

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Added link to this PR in relevant JIRA ticket or code PR

Copy link

sonarcloud bot commented Apr 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@adriendupuis adriendupuis marked this pull request as draft April 15, 2024 13:55
@adriendupuis adriendupuis changed the title Card version js Fix links VS version in hub cards Apr 19, 2024
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.

1 participant