Skip to content

Conversation

olaurendeau
Copy link
Contributor

@olaurendeau olaurendeau commented Aug 15, 2025

Purpose

This pull request intent to fix this issue.
If the first unicode char of a title is an emoji, this emoji will replace the standard icon in the tree.

Screenshot 2025-08-15 at 16 07 30

Proposal

I have made use of the library emoji-regex, because I didn't find a solution simple enough with a regex which would be compatible with ES5.

I took the liberty to add a make frontend-test command.

E2E Frontend test are failing, not sure it relates to this PR. I also had to increase the GitHub Action timeout so that it complete.

External contributions

Please ensure the following items are checked before submitting your pull request:

  • I have read and followed the contributing guidelines
  • I have read and agreed to the Code of Conduct
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)
  • I have added corresponding tests for new features or bug fixes (if applicable)

@olaurendeau olaurendeau force-pushed the feat/emoji-in-tree branch 3 times, most recently from f437f27 to d4db4a3 Compare August 15, 2025 14:52
@virgile-dev virgile-dev requested review from Ovgodd and AntoLC August 19, 2025 14:00
@AntoLC AntoLC added feature add a new feature frontend labels Aug 28, 2025
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

It is quite nice !


A few comments, plus 2 more things:

  • Do you know how to use Playwright ?
    If yes could you write a test e2e about the feature ? I think by updating this test could do the job:

    test('it updates the title doc', async ({ page, browserName }) => {
    await createDoc(page, 'doc-update', browserName, 1);
    const docTitle = page.getByRole('textbox', { name: 'doc title input' });
    await expect(docTitle).toBeVisible();
    await docTitle.fill('Hello World');
    await docTitle.blur();
    await verifyDocName(page, 'Hello World');
    });

  • I can see you are merging main in the branch, could you rebase it instead as we prefer a linear history? Thanks!

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

This part is not managed, if the document is pinned the emoji will not display.
We could eventually create a svg with only the "pin" icon and add it on the top right, wdyt ?

{isPinned ? (
<PinnedDocumentIcon
aria-hidden="true"
aria-label={t('Pin document icon')}
color={colorsTokens['primary-500']}
/>

image

Copy link
Contributor Author

@olaurendeau olaurendeau Aug 29, 2025

Choose a reason for hiding this comment

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

Hi @AntoLC,
Thanks for the thorough review !
Indeed there is something off with the pinned docs.
Do you mean something like this (with a proper pin icon of course)
Screenshot 2025-08-29 at 14 17 29
Screenshot 2025-08-29 at 14 17 01

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was thinking more about something like that ?
image

@rl-83 @virgile-dev WDYT ?

Implemented emoji detection system, new DocIcon component.
It was failing at 20min, increase the timeout to 30 min
@olaurendeau olaurendeau force-pushed the feat/emoji-in-tree branch 2 times, most recently from 069cba4 to fb454bb Compare August 29, 2025 12:13
@olaurendeau
Copy link
Contributor Author

Hi @AntoLC,
I think I've take into consideration all your comments. For the e2e tests I find it difficult to understand how to run them, so I took the liberty to turn the README into something easier for me to understand (and added a few more Make commands).
Let me know what you think !

@olaurendeau olaurendeau force-pushed the feat/emoji-in-tree branch 2 times, most recently from 1040b9e to 8770ab5 Compare August 29, 2025 13:19
@olaurendeau olaurendeau changed the title ✨(frontend) use title first emoji as doc icon in tree ✨(frontend) use title leading emoji as doc icon in tree Aug 29, 2025
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

About this commit (📝(frontend) propose a condensed version of the frontend README), I think we should do it in an other PR, it is a bit out of scope, it will be easier for review.

About this commit (✨(frontend) leading emoji in title, PR feedback applied), can it be a fixup commit instead, because its only purpose is fixing this commit ✨(frontend) use title first emoji as doc icon in tree.

@olaurendeau
Copy link
Contributor Author

olaurendeau commented Aug 29, 2025

About this commit (📝(frontend) propose a condensed version of the frontend README), I think we should do it in an other PR, it is a bit out of scope, it will be easier for review.

Removed. Moved here #1318

About this commit (✨(frontend) leading emoji in title, PR feedback applied), can it be a fixup commit instead, because its only purpose is fixing this commit ✨(frontend) use title first emoji as doc icon in tree.

CI does seems happy about this fixup commit
Screenshot 2025-08-29 at 18 13 28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature add a new feature frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transform the basic page icon by the emoji of the title in the tree structure
2 participants