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

[CLOSED] Commands constants should not have menu prefixes #6801

Open
core-ai-bot opened this issue Aug 30, 2021 · 2 comments
Open

[CLOSED] Commands constants should not have menu prefixes #6801

core-ai-bot opened this issue Aug 30, 2021 · 2 comments

Comments

@core-ai-bot
Copy link
Member

Issue by lkcampbell
Thursday Apr 17, 2014 at 15:04 GMT
Originally opened as adobe/brackets#7556


We have a bunch of constants in the Commands module that are prefixed with menu names. For example: Commands.FILE_NEW_FOLDER.

This is a maintenance hassle when moving commands from one menu to another.

Consider changing all Commands module constant names to have a prefix of CMD_ instead. For example: Commands.CMD_NEW_FOLDER.

See adobe/brackets#7488 as a concrete example of this problem.

IMPORTANT NOTE: This solution has some serious backwards compatibility problems associated with it. Even if the core code is updated there may be many extensions that rely on these constant names. We need to come up with some sort of deprecation strategy to warn extension authors. Currently, we do not have a good way to deprecate data values.

@core-ai-bot
Copy link
Member Author

Comment by njx
Monday Apr 21, 2014 at 18:49 GMT


@lkcampbell - thanks for filing this. We talked about it and we decided not to do this across the board for existing commands - we would only do it for commands that we're moving/changing anyway (like the ones in your PR) and would add deprecations if possible. Also, moving forward, for any new commands we should make sure that the constants don't have the menu name in them.

Closing.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Tuesday Apr 22, 2014 at 15:59 GMT


@njx, sounds good to me. I updated my Find menu PR to include a deprecation function that should make the process a bit easier while also providing good deprecation documentation as these changes occur.

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

No branches or pull requests

1 participant