RaspberryPiFoundation / editor-ui

Code Editor web component
https://editor-static.raspberrypi.org
Apache License 2.0
37 stars 8 forks source link

Add project_name_editable attribute to web component #1009

Closed floehopper closed 1 month ago

floehopper commented 1 month ago

Addresses #986 which is part of RaspberryPiFoundation/editor-standalone#16.

This will allow us to make the project name editable in editor-standalone (see RaspberryPiFoundation/editor-standalone#125) while leaving other projects using the web component (e.g. projects-ui) and the integrated version in editor-ui unchanged.

Note that this new attribute only affects the ProjectName component in the ProjectBar and not the one in the sidebar, i.e. in ProjectsPanel.

github-actions[bot] commented 1 month ago
floehopper commented 1 month ago

My only comment is that the variable name for the boolean that determines whether the name is editable changes throughout (projectNameEditable -> nameEditable -> editable). Maybe this is intentional though?

Yes, it was intentional - I felt as if the context is different in each case - see Remove redundant prefixes from projectNameEditable, e.g. it doesn't make much sense to me to use a property called projectNameEditable in the ProjectName component - editable makes more sense to me, because the projectName prefix is redundant.

loiswells97 commented 1 month ago

My only comment is that the variable name for the boolean that determines whether the name is editable changes throughout (projectNameEditable -> nameEditable -> editable). Maybe this is intentional though?

Yes, it was intentional - I felt as if the context is different in each case - see Remove redundant prefixes from projectNameEditable, e.g. it doesn't make much sense to me to use a property called projectNameEditable in the ProjectName component - editable makes more sense to me, because the projectName prefix is redundant.

Okay, fair enough, I think that makes sense 👍 Let's leave it as it is in that case