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

[Website] Hide Settings menu after clicking "Restore from .zip #1904

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

ajotka
Copy link
Contributor

@ajotka ajotka commented Oct 16, 2024

Motivation for the change, related issues

Issue #1903

Implementation details

Because Modal was in the same component as Dropdown Menu it was always visible when Dropdown was open (and disappears when I tried to force close menu item, because of unmounting).

So I decided to wrap dropdown with context and move there whole logic.

Testing Instructions (or ideally a Blueprint)

Just open Playground and go to settigns.

Screen with results

image

@ajotka ajotka requested a review from a team as a code owner October 16, 2024 08:49
@adamziel
Copy link
Collaborator

Nice! Thank you for contributing!

One thing that stood out to me is the modal provider. The other buttons in that dropdown menu use the redux dispatch(setActiveModal('error-report')); to set the active modal. Could this one do the same? Then it could be displayed in layout.tsx:

if (currentModal === 'log') {
return <LogModal />;
} else if (currentModal === 'error-report') {
return <ErrorReportModal blueprint={blueprint} />;
} else if (currentModal === 'start-error') {
return <StartErrorModal />;
}

@bgrgicak bgrgicak changed the title Bugfix/1903 [Website] Hide Settings menu after clicking "Restore from .zip Oct 17, 2024
@bgrgicak bgrgicak added [Type] Bug An existing feature does not function as intended [Package][@wp-playground] Website labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package][@wp-playground] Website [Type] Bug An existing feature does not function as intended
Projects
Status: Reviewed
Development

Successfully merging this pull request may close these issues.

3 participants