Skip to content

Simplify edit site state when called from context menu in the sidebar - #1807

Merged
sejas merged 4 commits into
add/site-context-menufrom
update/site-context-menu
Sep 25, 2025
Merged

Simplify edit site state when called from context menu in the sidebar#1807
sejas merged 4 commits into
add/site-context-menufrom
update/site-context-menu

Conversation

@sejas

@sejas sejas commented Sep 22, 2025

Copy link
Copy Markdown
Member

Related issues

Proposed Changes

  • Remove setTimeout and move setIsEditModalOpen to site details context

Testing Instructions

  • Run npm start
  • Double click a site
  • Click on edit site
  • Observe Studio selects that site and goes to the settings tab and open the edit site dialog

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@sejas sejas changed the title Update/site context menu Sep 22, 2025
@sejas
sejas changed the base branch from trunk to add/site-context-menu September 22, 2025 19:15
@sejas
sejas requested a review from ndiego September 22, 2025 19:15
Comment on lines +215 to +219
if ( site.id !== selectedSite?.id ) {
setSelectedSiteId( site.id );
}
setSelectedTab( 'settings' );
setIsEditModalOpen( true );

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I moved the logic to select the site, the settings tab and open the modal right to the place it triggers the event.

@sejas sejas mentioned this pull request Sep 22, 2025
1 task
@sejas sejas self-assigned this Sep 22, 2025
@sejas
sejas requested a review from a team September 22, 2025 23:21

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good to me, I don't see any regressions. I like that we removed timeout, I think it is a good improvement.

@sejas
sejas merged commit 7101550 into add/site-context-menu Sep 25, 2025
8 checks passed
@sejas
sejas deleted the update/site-context-menu branch September 25, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants