Fix blob overflow menu permalink shortcut does not get triggered
This happens when user navigate to the blob page from repository page. The `Mousetrap.bind()` in mounted() is getting ovewritten by the shortcuts_blob.js, which we use to trigger the old permalink button (when flag is off). This adds a feature flag check in `shortcuts_blob.js. Additionally, this also adds a new const under keybindings.js that better reflects the nature of the new permalink (e.g. copy). This feature was originally added in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/181901 and is behind the `blob_overflow_menu` feature flag.
显示
- app/assets/javascripts/behaviors/shortcuts/keybindings.js 4 个添加, 1 个删除app/assets/javascripts/behaviors/shortcuts/keybindings.js
- app/assets/javascripts/behaviors/shortcuts/shortcuts_blob.js 6 个添加, 0 个删除app/assets/javascripts/behaviors/shortcuts/shortcuts_blob.js
- locale/gitlab.pot 3 个添加, 0 个删除locale/gitlab.pot
- spec/frontend/behaviors/shortcuts/shortcuts_blob_spec.js 56 个添加, 0 个删除spec/frontend/behaviors/shortcuts/shortcuts_blob_spec.js
加载中
想要评论请 注册 或 登录