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

Prefix operation ids with parent id #1245

Open
wants to merge 2 commits into
base: master
from

Conversation

@BBlowers
Copy link

@BBlowers BBlowers commented Apr 24, 2020

Currently, operations that have multiple tags appear multiple times on the page as desired, however, their containing elements share the same id. This means when using the side menu to navigate the user is always taken to the earliest occurrence.

To demonstrate I've added the pet tag to the "Returns pet inventories by status" operation in this gif. Clicking on the "Returns pet inventories by status" operation in the store section takes the user to the operation under the pet section
redoc section links

A solution to this is to prefix operation ids with their parent's id.

@RomanHotsiy
Copy link
Member

@RomanHotsiy RomanHotsiy commented May 9, 2020

@BBlowers thank you for your PR! Unfortunately, this is a breaking change. Old URLs will stop working.

Would you have some time add support for old operation/* URLs or to enable this behavior optionally by creating new Redoc option.

Let me know, I can pick this up.

@BBlowers
Copy link
Author

@BBlowers BBlowers commented May 11, 2020

@RomanHotsiy good point.

Supporting both operation/* and parent/*/operation* makes the most sense to me. I'll update the PR asap

@BBlowers
Copy link
Author

@BBlowers BBlowers commented May 12, 2020

@RomanHotsiy I've added the operation/* format id to the OperationRow component which works with the scrolling system being used.

I've kept the changes to a minimum as I'm not too familiar with typescript.

@BBlowers
Copy link
Author

@BBlowers BBlowers commented Jun 4, 2020

@RomanHotsiy is this PR likely to get another look soon?

@RomanHotsiy
Copy link
Member

@RomanHotsiy RomanHotsiy commented Jun 9, 2020

Hey @BBlowers,

Sorry for the radio silence. I will review and merge it this week. This looks good. I just have to test if it doesn't break our other tools.

@BBlowers
Copy link
Author

@BBlowers BBlowers commented Jun 19, 2020

@RomanHotsiy How did the tests go? Is this okay to be merged?

@RomanHotsiy
Copy link
Member

@RomanHotsiy RomanHotsiy commented Jun 19, 2020

Oh, sorry, not really. I haven't tested it yet.

Thanks for pinging. I am now adding it to the team sprint board so we prioritize it. If it is not merged mid-next week - feel free to ping me again!

Sorry, busy months for me :(

@RomanHotsiy
Copy link
Member

@RomanHotsiy RomanHotsiy commented Jun 25, 2020

I just tested it out and there is some conflict with our internal tool. It should be fixed early next week and I will merge after.

@BBlowers
Copy link
Author

@BBlowers BBlowers commented Nov 3, 2020

any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.