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

Bugfix/13911 order edit duplicate tabs #3330

Merged
merged 7 commits into from
Nov 13, 2023

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Nov 9, 2023

Description

On the order edit page, we’re getting both dynamic and static versions of the edit form. Each version pulls in the content tabs, so they’re essentially duplicated.

Issue 1: both static and dynamic tabs were taken into account when calculating if the tabs dropdown should be shown.
Fixed by re-initialising tabs after OrderActions had a chance to add a hidden class to the ones that should be hidden.

Issue 2: all tabs (for the static and dynamic forms) were showing in the tabs dropdown (looks like this existed in v3, too). Fixed by programmatically showing/hiding dropdown tab links depending on whether the order is being edited or not.

Issue 3 (raised by Nathaniel): when in editing mode, the “Transactions” tab was still selectable from the dropdown. Fixed by making it appear disabled, preventing pointer events and then falling back on selecting the previously selected tab if a user still somehow managed to select the “Transactions” tab from the dropdown.

All of the above is complemented by a CMS PR (craftcms/cms#13926) that skips moving focus to disabled options when navigating via keyboard.

Related issues

craftcms/cms#13911

@i-just i-just requested a review from a team as a code owner November 9, 2023 14:10
@lukeholder
Copy link
Member

Thanks @i-just !

@lukeholder
Copy link
Member

I will let @nfourtythree review/merge this as he has recent experience with the order editor vue app.

@nfourtythree
Copy link
Contributor

Thanks for this @i-just !

@nfourtythree nfourtythree merged commit ec844e6 into develop Nov 13, 2023
8 checks passed
@nfourtythree nfourtythree deleted the bugfix/13911-order-edit-duplicate-tabs branch November 13, 2023 10:00
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.

3 participants