✨(frontend) Optionally include title in export#1956
✨(frontend) Optionally include title in export#1956Wqrld wants to merge 1 commit intosuitenumerique:mainfrom
Conversation
This commit introduces a checkbox in the export menu for inserting the document title Signed-off-by: Luc Haaijer <luc@haaijer.dev>
bafddd5 to
08de7e8
Compare
|
Thanks for your contribution @Wqrld ! |
I had the same doubts for a while, but given the current editor UI (with the title being right ontop of the editor, resulting in having the title twice right above eachother in many documents) this seems like what most people would expect. That is also what i got from the linked issue and some discussion on matrix. Given the automatic title detection it should not be intrusive to any workflows and only be an improvement. If this path is not taken, I would choose to refactor the UI so the title is further away (a la google docs); but I obviously prefer this PR :). |
|
My UX suggestion is not to include a checkbox and to always display the page title, exactly as Notion does.
|
|
It sounds like this would remove the option of customizing the title, which some people still want to do. Ex: We often have the date and the logo at the top of the document, and then a centered title. But other documents are more basic and would just benefit from having a simple title in the export |
Purpose
This commit introduces a checkbox in the export menu for inserting the document title.
On modal open, we check if the document contains an h1 and only precheck the checkbox if none is found. If the user overrides this checkbox, this is saved on a per-document basis.
Resolves #1837
Functionality
withTitletruefalsetrue/falseDiscussion
Print uses a slightly different exporter which does not have a neat way of prepending a title so we just hide the checkbox there.
Please ensure the following items are checked before submitting your pull request:
git commit --signoff(DCO compliance)git commit -S)<gitmoji>(type) title description## [Unreleased]section (if noticeable change)