Skip to content
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

✨(frontend) one-click document creation #275

Merged
merged 11 commits into from
Oct 2, 2024
Merged

Conversation

arnaud-robin
Copy link
Collaborator

@arnaud-robin arnaud-robin commented Sep 22, 2024

Purpose

We want to reduce friction for document creation.
We want the user to be able to create document with a single click wihout having to type in the title and then allow for editing the title in place.
If no title is set, the first editor heading is used as the title of the document.

Proposal

  • ♻️(frontend) one click create doc
  • ✨(frontend) edit title inline
  • 🔥(frontend) remove useless update title codes
  • ✨(frontend) first heading is the title of the document
  • tests

Demo

scrnli_10_2_2024_11-54-29.AM.webm

@arnaud-robin arnaud-robin mentioned this pull request Sep 22, 2024
4 tasks
@arnaud-robin arnaud-robin linked an issue Sep 22, 2024 that may be closed by this pull request
4 tasks
the sticky panel editor is not working properly,
the panel editor should be sticky until the bottom
when the user scrolls the page.
@AntoLC AntoLC force-pushed the feature/editable-title branch 2 times, most recently from 95a81f2 to a894269 Compare October 2, 2024 09:32
@AntoLC AntoLC self-assigned this Oct 2, 2024
We now redirect to the OIDC when a user is on
a private doc and get a 401 error.
In order to stay DRY, we moved the function
to know if a user is from a firefox browser
from useSaveDoc to utils userAgent.
We rename useTransRole to useTrans to make
it more general and reusable.
It will be used for all reusable doc translation.
We can now create a doc in one click.
The doc will be created with a default name,
the user will be able to edit the name inline.
We can now edit the title of the document inline.
This is a feature that is very useful for users
who want to change the title of the document
without having to go to the document
management page.
We can now update the title directly in the header,
so we don't need the update title modal anymore.
We remove the buttons to trigger the modal
and the modal itself.
We need to get the headings in multiple places.
To not have multiple listeners to compute the same
thing, we will use a store to store the editor
headings.
When we create a new document,
the initial content is now a heading instead of a
paragraph.
This is to make it easier to set the title
of the document.
When the title of the doc is not set, the first heading
is used as the title of the document.
To keep the codebase clean and organized,
we moved the Markdown button to its own file.
@AntoLC AntoLC marked this pull request as ready for review October 2, 2024 13:24
@AntoLC AntoLC self-requested a review October 2, 2024 13:24
@AntoLC AntoLC merged commit e642506 into main Oct 2, 2024
16 of 17 checks passed
@AntoLC AntoLC deleted the feature/editable-title branch October 2, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

One click doc creation
2 participants