Skip to content

refactor uiCmdSequence into a separate function#11998

Open
k-yle wants to merge 1 commit intodevelopfrom
kh/render-kbd
Open

refactor uiCmdSequence into a separate function#11998
k-yle wants to merge 1 commit intodevelopfrom
kh/render-kbd

Conversation

@k-yle
Copy link
Collaborator

@k-yle k-yle commented Mar 11, 2026

prerequisite for #11999

In that PR I want to reuse the logic that converts:

{  modifiers: ["⌥"], shortcuts: ["+", "-"], separator: "," }

into:

⌥ Option +, -

To test: check that the keyboard shortcuts popup still renders correctly.

@k-yle k-yle added the chore Improvements to the iD development experience or codebase label Mar 11, 2026
@matkoniecz

This comment was marked as resolved.

@tordans
Copy link
Collaborator

tordans commented Mar 14, 2026

To test: check that the keyboard shortcuts popup still renders correctly.

have you done this already? Or is it a hint for reviewers?

Tested in the preview at https://pr-11998--ideditor.netlify.app/#disable_features=boundaries&map=2.00/0.0/0.0&background=Bing so yes, still works.

image

@k-yle
Copy link
Collaborator Author

k-yle commented Mar 16, 2026

have you done this already? Or is it a hint for reviewers?

yes sorry for the poor wording, i did also test this mysefl

Copy link
Member

@tyrasd tyrasd left a comment

Choose a reason for hiding this comment

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

Looks good to me. But can we please talk about what indentation style to use for new files? I know https://github.com/openstreetmap/iD/blob/develop/CONTRIBUTING.md#javascript has documented the different rule for ES5/ES6 files, but I think that's just silly (especially in this context, as typescript is neither).

As the majority of our source files still use 4-space indentation, why don't we stick to that even for newly added/refactored typescript code? I would leave the existing two-space indented files as they are as long as we don't touch them in a major way. Does that makes sense? If yes, I can update the documentation to reflect it.

@k-yle
Copy link
Collaborator Author

k-yle commented Mar 18, 2026

sounds good to me - changed to 4 spaces now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Improvements to the iD development experience or codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants