Skip to content

Commit 8fc8b9f

Browse files
committed
rename ProjectCustomFieldEditController to ProjectCustomFieldModalController
It is going to allow also to view comment for users with view, but no edit permission
1 parent 215be27 commit 8fc8b9f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

frontend/src/stimulus/controllers/dynamic/project-custom-field-edit.controller.ts renamed to frontend/src/stimulus/controllers/dynamic/project-custom-field-modal.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
import { Controller } from '@hotwired/stimulus';
3333

34-
export default class ProjectCustomFieldEditController extends Controller {
34+
export default class ProjectCustomFieldModalController extends Controller {
3535
static values = {
3636
url: { type: String },
3737
};

modules/overviews/app/components/overviews/project_custom_fields/item_component.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ def editable_wrapper
6767
tag: :div,
6868
classes: "project-custom-field-clickable",
6969
data: {
70-
controller: "project-custom-field-edit async-dialog",
71-
"project-custom-field-edit-url-value": edit_project_custom_field_path(project_id: @project.id,
70+
controller: "project-custom-field-modal async-dialog",
71+
"project-custom-field-modal-url-value": edit_project_custom_field_path(project_id: @project.id,
7272
id: @project_custom_field.id),
73-
action: "click->project-custom-field-edit#openEditDialog " \
74-
"keydown.enter->project-custom-field-edit#openEditDialog " \
75-
"keydown.space->project-custom-field-edit#openEditDialog " \
76-
"project-custom-field-edit:open-dialog->async-dialog#handleOpenDialog"
73+
action: "click->project-custom-field-modal#openEditDialog " \
74+
"keydown.enter->project-custom-field-modal#openEditDialog " \
75+
"keydown.space->project-custom-field-modal#openEditDialog " \
76+
"project-custom-field-modal:open-dialog->async-dialog#handleOpenDialog"
7777
},
7878
aria: {
7979
label: [
@@ -83,7 +83,7 @@ def editable_wrapper
8383
},
8484
role: "button",
8585
tabindex: 0,
86-
test_selector: "project-custom-field-edit-button-#{@project_custom_field.id}"
86+
test_selector: "project-custom-field-modal-button-#{@project_custom_field.id}"
8787
)
8888
end
8989

spec/support/pages/projects/show.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def open_edit_dialog_for_custom_field(custom_field)
9393
# Once we create the project custom field inline editing, this can be reverted to a normal
9494
# capybara click method call.
9595
page.execute_script(
96-
"document.querySelector('[data-test-selector=\"project-custom-field-edit-button-#{custom_field.id}\"]').click()"
96+
"document.querySelector('[data-test-selector=\"project-custom-field-modal-button-#{custom_field.id}\"]').click()"
9797
)
9898
end
9999

0 commit comments

Comments
 (0)