-
Notifications
You must be signed in to change notification settings - Fork 251
Refactor context_menu.js #7563
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
Refactor context_menu.js #7563
Conversation
Pull Request Test Coverage Report for Build 15722884691Details
💛 - Coveralls |
| import CreateTagModal from "../Modals/create_tag_modal"; | ||
| import {pathToNode} from "../Helpers/range_selector"; | ||
| import {ResultContext} from "./result_context"; | ||
| import {annotation_context_menu} from "../../../assets/javascripts/Results/context_menu"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is good; however, please also move the file to app/javascript/Components/Result (since this file is only used by the Result component).
Changelog.md
Outdated
| - Remove the placeholder "..." text under the "Proposed changes" section in `PULL_REQUEST_TEMPLATE.md`. (#7524) | ||
| - Update the checklist in `PULL_REQUEST_TEMPLATE.md` to make the text "list of contributors" a link to the file in the repository. (#7524) | ||
| - Enabled `erb_lint` linter for erb files (#7561) | ||
| - Refactored the loading method of `javascripts/Results/context_menu.js`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include the pull request number for this entry
|
Nice work, @freyazjiner 🎉 |
Proposed Changes
(Describe your changes here. Also describe the motivation for your changes: what problem do they solve, or how do they improve the application or codebase? If this pull request fixes an open issue, use a keyword to link this pull request to the issue.)
This PR modifies how context_menu.js is loaded by removing it from main.js and importing it directly into result.jsx where it's actually used. This change eliminates reliance on the global window.annotation_context_menu object.
Screenshots of your changes (if applicable)
Associated documentation repository pull request (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)