Skip to content

Conversation

@tsmaeder
Copy link
Member

@tsmaeder tsmaeder commented Aug 8, 2025

Fixes #16132, #16082

What it does

How to test

Make sure the various "commit" actions work now as described in the issue. Test with both "native" and "custom" title bar styles.
Make sure other menus still work fine (e.g. "Explorer" context menu, toolbar actions, etc.)

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Contributed on behalf of STMicroelectronics

Review checklist

Reminder for reviewers

Fixes eclipse-theia#16132, eclipse-theia#16082

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <[email protected]>
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Aug 8, 2025
@colin-grant-work colin-grant-work self-requested a review August 8, 2025 14:36
tsmaeder added a commit to tsmaeder/theia that referenced this pull request Aug 18, 2025
Fixes eclipse-theia#16148

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <[email protected]>
@colin-grant-work
Copy link
Contributor

I would prefer this PR to #16191, as it is less breaking, and I don't think the advantages of #16191 outweigh that. I would still prefer something like #16149 because it removes this piece of internal bookkeeping from the view of most clients of the menu system.

@ndoschek ndoschek linked an issue Sep 17, 2025 that may be closed by this pull request
@ndoschek
Copy link
Contributor

Hi @tsmaeder, @colin-grant-work, @martin-fleck-at,

Thanks everyone for the effort and discussion around the three PRs addressing the issue. I would like to get to a decision and get the fix in for the upcoming release (next week).

From the feedback, it seems there is a preference towards avoiding unnecessary breaking changes while still improving the API surface. Given that, and unless there are strong objections, I would propose to move ahead with this current PR for this release. It provides a reasonable compromise between stability and cleanup, and ensures we have a solution ready in time.

If further refinements (e.g. along the lines of #16149) are still desired, we can continue iterating in a follow-up PR. Does that sound acceptable to everyone?

Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

Solves the immediate problem. 👍

Comment on lines 316 to 325
/*
return this.menuNode.children.map(child => {
if (CompoundMenuNode.is(child)) {
return new ToolbarItemAsSubmenuWrapper(child, [...this.effectiveMenuPath, child.id]);
} else if (CommandMenu.is(child)) {
return new ToolbarItemAsCommandMenuWrapper(child, [...this.effectiveMenuPath, child.id]);
} else {
throw new Error('should not happen');
}
}).filter(node => node !== undefined).filter(node => node as MenuNode);*/
Copy link
Contributor

Choose a reason for hiding this comment

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

To be kept?

Comment on lines +272 to +273
* This class wraps a menu node, but replaces the effective menu path. Command parameters need to be mapped
* for commands contributed by extension and this mapping is keyed by the menu path
Copy link
Contributor

Choose a reason for hiding this comment

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

It probably would have been helpful if I'd made a similar comment back in #11290

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Needs merge in PR Backlog Sep 17, 2025
@colin-grant-work
Copy link
Contributor

@ndoschek, I'm ok moving forward with this fix for now.

@ndoschek
Copy link
Contributor

Hi @tsmaeder, do you have time to update this PR so we can get it in by Thursday for the release?
If not, just let me know and we'll figure something out.
Thanks in advance!

@tsmaeder
Copy link
Member Author

Probably no, quite busy this week.

@ndoschek
Copy link
Contributor

ndoschek commented Sep 22, 2025

Ok thanks! No worries, we'll take care of it then!

Copy link
Contributor

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

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

Thanks for the update @colin-grant-work, I tested the mentioned commands and menus and works as expected 👍

@ndoschek
Copy link
Contributor

Hi @colin-grant-work, I re-triggered the ECA validation today, and it was successful now 👍

@colin-grant-work colin-grant-work merged commit 9ce14ab into eclipse-theia:master Sep 23, 2025
10 of 11 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Sep 23, 2025
@github-actions github-actions bot added this to the 1.65.0 milestone Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Cannot "Commit Staged (Signed Off)" at all Custom context menu arguments are not passed to submenus

3 participants