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

I9870 - Consolidate modal rendering stack #344

Merged
merged 12 commits into from
Apr 10, 2024

Conversation

jardakotesovec
Copy link
Collaborator

No description provided.

const options = ref(null);
const options2 = ref(null);
const modalStore = useModalStore();
const {sideModal1, sideModal2} = storeToRefs(useModalStore());
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps the sideModal{1,2} can be renamed to something better (e.g. outer/innerModal)

Copy link
Collaborator Author

@jardakotesovec jardakotesovec Apr 9, 2024

Choose a reason for hiding this comment

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

@jonasraoni There might be 3 levels in future.. so number actually works quite well.. And to be honest I hope that headlessui handles the stacking on their side - so I will be able to delete these work arounds.. (they have opened issue with this)

Copy link
Contributor

Choose a reason for hiding this comment

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

No worries 😁


// pkp.eventBus.$emit('open-tab', tab);
// Component can be either string or actual vue component
const component1 = computed(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd create a function function createComputed(sideModal) { return computed(...); }; to decrease the duplicated code, but it's not important :)

Copy link
Contributor

@jonasraoni jonasraoni left a comment

Choose a reason for hiding this comment

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

FYI I've just skimmed through the code, it's not possible to understand if everything makes sense without deep diving into the new code at the ui-library + the legacy one, but that would take a lot of time :)

It's a positive improvement. And as it's scheduled against +3.5, we'll have enough time to the flag problems.

@jardakotesovec
Copy link
Collaborator Author

@jonasraoni Thanks! Agreed.. I also think its impossible to guess all possible use cases that might have been there but maybe they already been replaced by Vue.js. So for this I rely quite a lot on cypress tests, which helped me to discover some of the more edge case situations (like delayed modal being closed while second one being opened). But it went actually quite well so hoping it solves more problems than it creates :-).

@jardakotesovec jardakotesovec merged commit b2ac693 into pkp:main Apr 10, 2024
2 of 4 checks passed
@jardakotesovec jardakotesovec deleted the i9870 branch April 10, 2024 08:36
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