Skip to content

Conversation

olaurendeau
Copy link
Contributor

@olaurendeau olaurendeau commented Sep 15, 2025

Purpose

Adjust the behaviors of Doc title emojis in Home page, Doc tree and Doc editor following discussion on #1358 (comment)
Here is a video displaying those new behaviours

Proposal

  • Home page - remove standard icon replacement by doc emoji
  • Doc header - emoji picker before the title + removal button in menu
  • Doc Tree - emoji picker before the title + removal button in menu
  • Interlinking - Display emoji instead of standard icon
  • Multiple EmojiPicker Problem : It was possible to trigger multiple picker from Callout or DocIcon, adding an overlay to close the picker fixed the issue.

Illustrations

Screenshot 2025-09-15 at 21 06 18 Screenshot 2025-09-15 at 21 06 43 Screenshot 2025-09-15 at 21 07 00 Screenshot 2025-09-15 at 21 06 53

External contributions

Thank you for your contribution! 🎉

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 changed the title 🩹(frontend) on main pages do not display leading emo… 🩹(frontend) on main pages do not display leading emoji as page icon Sep 15, 2025
@olaurendeau olaurendeau changed the title 🩹(frontend) on main pages do not display leading emoji as page icon ✨(frontend) adjust doc emoji behaviour and introduce emoji picker Sep 15, 2025
@olaurendeau olaurendeau force-pushed the feat/emoji-design-updates branch from 0586dbb to 6567267 Compare September 15, 2025 16:55
@olaurendeau olaurendeau force-pushed the feat/emoji-design-updates branch 4 times, most recently from 9f4562a to 54aeeaa Compare September 16, 2025 06:48
@AntoLC AntoLC added frontend feature add a new feature labels Sep 18, 2025
@AntoLC AntoLC self-requested a review September 18, 2025 11:10
@virgile-dev
Copy link
Collaborator

virgile-dev commented Sep 18, 2025

Thanks @olaurendeau !
I've just finalized the design spec with @rl-83
It's not far from what you made, just a few adjustments.
Here the figma link : https://www.figma.com/design/qdCWR4tTUr7vQSecEjCyqO/DOCS?node-id=10819-16516&t=qMesCig19Quww17S-1
@rl-83 will ping you here once he is finished.

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 works well ! Thank you 🎉
Mainly minor comments.

Under the Figma url, to be iso with what has made @rl-83 :
https://www.figma.com/design/qdCWR4tTUr7vQSecEjCyqO/DOCS?node-id=10856-18743&t=YHWKAzs0R27yHARe-0

Comment on lines 36 to 53
if (withOverlay) {
return (
<>
{/* Overlay transparent pour fermer en cliquant à l'extérieur */}
<div
style={{
position: 'fixed',
top: 0,
left: 0,
width: '100vw',
height: '100vh',
zIndex: 999,
backgroundColor: 'transparent',
}}
onClick={onClickOutside}
/>
{pickerContent}
</>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it necessary ? The picker has already onClickOutside, without this part the picker seems to close correctly when click outside.

Copy link
Contributor Author

@olaurendeau olaurendeau Sep 22, 2025

Choose a reason for hiding this comment

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

onClickOutside is working fine for everything but the emoji button. There's maybe a better way to handle this issue ?
Example with the callout component :
Screenshot 2025-09-22 at 15 15 44

Comment on lines 76 to 87
<Box
$display="inline-block"
$css={css`
margin-right: 0.3rem;
`}
>
{emoji ? (
<Icon iconName={emoji} $size="16px" />
) : (
<SelectedPageIcon width={11.5} />
)}
</Box>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure why adding another div inside, by adding this margin we differ from the design inside Figma.

Suggested change
<Box
$display="inline-block"
$css={css`
margin-right: 0.3rem;
`}
>
{emoji ? (
<Icon iconName={emoji} $size="16px" />
) : (
<SelectedPageIcon width={11.5} />
)}
</Box>
{emoji ? (
<Icon iconName={emoji} $size="16px" />
) : (
<SelectedPageIcon width={11.5} />
)}

Copy link
Contributor Author

@olaurendeau olaurendeau Sep 22, 2025

Choose a reason for hiding this comment

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

Without the additional margin-right it felt different than the tree. And too tight IMO.
Tree :
Screenshot 2025-09-22 at 15 20 40

Interlinking without margin :
Screenshot 2025-09-22 at 15 20 35

Interlinking with margin : (It also feel misaligned now that I look back at it)
Screenshot 2025-09-22 at 15 22 16

Comment on lines 100 to 120
<DocIcon
emojiPicker
docId={doc.id}
title={doc.title}
emoji={emoji}
$size="50px"
defaultIcon={
<SimpleFileIcon
width="50px"
height="50px"
aria-hidden="true"
aria-label={t('Simple document icon')}
color={colorsTokens['primary-500']}
/>
}
/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed I took some liberty !
Here is the updated version, WDYT ?
Screenshot 2025-09-22 at 15 31 04

Copy link
Collaborator

Choose a reason for hiding this comment

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

In our process we try to have the design provided as the single source of truth, it make it easier for design integration and then review. That say, you are welcome to add a comment in the Figma to say to Robin that you find that it would better in one way or another.

@olaurendeau olaurendeau force-pushed the feat/emoji-design-updates branch from d52b240 to d96fcf6 Compare September 22, 2025 13:50
@olaurendeau
Copy link
Contributor Author

@AntoLC thanks for your review, I've answered or fixed your remarks.

@rl-83 any feedback ?

@olaurendeau olaurendeau force-pushed the feat/emoji-design-updates branch from d96fcf6 to 8957c85 Compare September 22, 2025 14:09
@AntoLC AntoLC self-requested a review September 26, 2025 08:07
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.

Some minor comments.

I will prepare a environment for Robin to review, I think it would be only next week though.

@olaurendeau olaurendeau force-pushed the feat/emoji-design-updates branch from 8957c85 to a3f0464 Compare September 26, 2025 13:17
@olaurendeau olaurendeau force-pushed the feat/emoji-design-updates branch from a3f0464 to f40d864 Compare September 26, 2025 13:20
@olaurendeau olaurendeau force-pushed the feat/emoji-design-updates branch from f40d864 to 06176fd Compare September 26, 2025 13:25
@olaurendeau
Copy link
Contributor Author

Ok @AntoLC I believe that I've taken into consideration all your comments !
Eager to hear back from @rl-83 & @virgile-dev

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
3 participants