-
Notifications
You must be signed in to change notification settings - Fork 323
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
Renaming project in GUI #10243
Renaming project in GUI #10243
Conversation
4ec5ff5
to
1c57dba
Compare
…/renaming-project-in-gui
@somebody1234 @MrFlashAccount Please, review my changes in dashboard. Also, I don't know how to properly update the name in project list after changing it in project view. Any hints? |
@@ -38,6 +39,7 @@ export default function Editor(props: EditorProps) { | |||
const gtagEvent = gtagHooks.useGtagEvent() | |||
const gtagEventRef = React.useRef(gtagEvent) | |||
const remoteBackend = remoteBackendProvider.useRemoteBackend() | |||
const { backend } = backendProvider.useStrictBackend() |
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.
not sure this works - it's possible to have a Local project opened while the Cloud Backend is being used for the Drive view.
unfortunately i can't think of an easy fix... might need to add backend
to projectStartupInfo
(or perhaps lift the entire renameProject
function into projectStartupInfo
- although given that it is potentially set from multiple places it's probably unnecessarily duplicating the logic)
as for changing the project name - there is a projectStartupInfo.setProjectAsset(asset => ({ ...asset, title: newName }))) or this, with the appropriate import (auto-import + change projectStartupInfo.setProjectAsset(object.merger({ title: newName })) |
…/renaming-project-in-gui
006392e
to
e2044ec
Compare
@somebody1234 I came back to this one; applied your review with the suggestion: it works, but only when I open the project in given session; if the project is automatically opened, |
We decided to merge this PR with the above issue. Still requires review, though. |
v-model.lazy="model" | ||
:autoSelect="true" | ||
@change="emit('renamed', $event ?? '')" |
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.
When the AutoSizedInput changes, this component emits both update:modelValue
and renamed
?
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.
Yes, the renamed event is redundant, removed.
…/renaming-project-in-gui
Pull Request Description
Fixes #10073
Screencast.from.2024-06-11.13-01-10.webm
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.