Closed laurenwalker closed 4 years ago
For the MVP, let's allow only section name changes for the Markdown sections. The Data, Members, and Metrics tab names will continue to be hard-coded in MetacatUI.
I created a new issue for renaming the other section types: #1058
I added the menu to each section tab that has the Rename
menu option. It doesn't do anything when you click on it yet.
Hi Lauren - yes I pulled in the changes from #1081 They look good.
Hi Lauren - I've added the rename a section function to PortEditorSectionsView
. Whenever rename is clicked - the label gets a focus applied to it with a blinking cursor (indicating the section is editable).
I tried applying the bootstrap's focus / highlight CSS rules, but it seems that they're only applicable to input
HTML element. Since the sections tabs are an anchor element, I've added custom CSS rule to highlight the editable part in this commit: https://github.com/NCEAS/metacatui/commit/745405e8761b04dbda12e1ed9c2614fd596b6dba
I noticed one issue when the focus CSS rules get applied on click (section name). (though the section remains uneditable as expected). I'm moving this back to the "in-progress" column. Needs work.
Hi Rushi - I see you moved this into the Review pipeline a week ago. Did you want me to review this?
Hi Lauren - yes, that was my intention. But I think we have already reviewed this as a group during our last Portals meeting. So, maybe this is good to be close right now.
I looked it over and fixed a couple minor issues. Will close
When "Rename" is clicked, the tab name will become editable. On
focusout
, the ProjEditorSectionView will change thelabel
of the section in the ProjectSectionModel.Since the Data and Metrics tabs are not associated with ProjectSectionModels, their labels/names are set as the
dataLabel
andmetricsLabel
attributes on the ProjectModel. These are serialized asoptions
in the project document XML.