-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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: bitbucket server edit url resolves correctly #20047
Conversation
Changed Packages
|
Thanks for the contribution! |
Uffizzi Ephemeral Environment
|
Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
72ddf2b
to
f67cfc3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a changeset to get shipped.
The comment above states that there is no edit mode to link to. Is that not true?
Also, hm. The comment that got removed is interesting. I wonder if that impact is still relevant. Does perhaps @backstage/techdocs-maintainers know? Either way, that sounds like something that should be fixed in the TechDocs end rather than here.
Thanks @freben for your reply. The edit button in techdocs redirects you always to the master branch and not to the correct branch (the query params are cut also there), so it is another bug to be fixed. |
Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
Some what related: #12892 @pjungermann any feedback or thoughts on this one? |
We could maybe keep only the |
@fedy97 This change was done consciously by another Bitbucket Server user in order to make "edit URL" work for Tech Docs. By not removing the query parameters, you will break the "edit" button feature at Tech Docs. The reason for this is mkdocs itself and how it supports edit_uri there. I worked on a change at PR #16699 which will make it work without removing the query parameters, also for other systems like Bitbucket Cloud. However, it still requires some changes to mkdocs-techdocs-core and mkdocs-monorepo-plugin before it could be merged. |
I am not able to reproduce the breaking of the edit button, it always redirect me to the |
I just found the original PR #12857 for context. |
@omerfarukdogan as the original author of the aforementioned PR, maybe you can have a look at this change. |
@fedy97 Which version of Backstage are you using? I have just tested on ours (1.13.0) and the edit button still works correctly. It opens the source of the current page ( Are you setting up techdocs-url like this?
|
@omerfarukdogan the issue is this #20042 : I have this catalog info
which has
When I import it, the edit-url is wrong, it is missing the |
@fedy97 I don't think the function you are modifying is related to the annotation you have an issue with ( On the other hand, the parameters on the document URL are indeed removed from the "edit document" button. Otherwise mkdocs generates an incorrect URL for editing (IIRC |
@omerfarukdogan The change I made in this PR affects only the annotation |
@fedy97 I would imagine most people to use the main branch for documentation so it wouldn't cause a problem for most cases. Our options are:
This PR is going with 2 (unless we also fix mkdocs), I would prefer 1 rather than 2, but it's up to the maintainers IMO. |
Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
@omerfarukdogan I fixed the edit button link, now it redirects always to master, but the annotation |
Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
@omerfarukdogan I've started to work on option 3 at the PR I've referenced above. There is a way on newer mkdocs versions. However, still a few things to adjust at backstage's own plugins. |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Hey, I just made a Pull Request!
from this:
to this:
✔️ Checklist
Signed-off-by
line in the message. (more info)Closes #20042