Skip to content

[WEB-65] [EDITOR] Make blog title editable within editor #374

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

Merged
merged 8 commits into from
Sep 4, 2023

Conversation

josh-ramos-22
Copy link
Contributor

Why the changes are needed

Currently there is no way to edit a document's filename while inside the editor.

Changes

I took inspiration from Google Docs and made it so that when a user hovers over the filename in the editor, the cursor turns into an I-beam and the title slightly enlarges. This indicates to the user that the title is editable. Then upon clicking, the title visibly becomes a text box which users can write into. Once they are done renaming, they click out of the text box and the new filename is saved :D

File changes summary

  • frontend/src/cse-ui-kit/EditableTitle_textbox/* - new component defining the custom text box for the editable file name
  • frontend/src/packages/editor/index.tsx - integrated code to support file renaming. Reused code from frontend/src/packages/dashboard/components/FileRenderer/Renamable.tsx to update the redux state to ensure the new file name is propagated globally.

Demo

React.App.-.Google.Chrome.2023-06-18.01-40-52.mp4

Copy link
Contributor

@lauraw0 lauraw0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lookss niceeee

@josh-ramos-22 josh-ramos-22 merged commit 46a336b into main Sep 4, 2023
@josh-ramos-22 josh-ramos-22 deleted the WEB_65_EDITOR_edit_blog_title_capability branch September 4, 2023 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants