Skip to content

Conversation

sejas
Copy link
Member

@sejas sejas commented Sep 22, 2025

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 Simplify edit site state when called from context menu in the sidebar 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
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
Copy link
Contributor

@katinthehatsite katinthehatsite left a comment

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants