Skip to content

Conversation

@Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Oct 30, 2025

Purpose

Improve mobile user experience by indicating when a document or a subdocument has children.

issue : 1314

image

Proposal

  • Display the number of sub-documents in mobile view only and only if they exist
  • Adjust the UI to accommodate the new child count information
  • Create a DocHeaderInfo component to encapsulate related logic and rendering

@Ovgodd Ovgodd requested a review from AntoLC October 30, 2025 10:02
@Ovgodd Ovgodd self-assigned this Oct 30, 2025
@Ovgodd Ovgodd added enhancement improve an existing feature frontend labels Oct 30, 2025
helps users notice root documents have children in mobile view

Signed-off-by: Cyril <[email protected]>
@Ovgodd Ovgodd force-pushed the feat/1314-show-sub-docs-count branch from e79dba5 to 050189f Compare October 30, 2025 10:03
@Ovgodd Ovgodd marked this pull request as ready for review October 30, 2025 10:03
Comment on lines +64 to +94
{isDesktop ? (
<>
<Text
$variation="600"
$size="s"
$weight="bold"
$theme={isEditable ? 'greyscale' : 'warning'}
>
{transRole(
isEditable ? doc.user_role || doc.link_role : Role.READER,
)}
&nbsp;·&nbsp;
</Text>
<Text $variation="600" $size="s">
{dateToDisplay}
</Text>
</>
) : (
<>
<Text $variation="400" $size="s">
{hasChildren ? relativeOnly : dateToDisplay}
</Text>
{hasChildren ? (
<Text $variation="400" $size="s">
&nbsp;•&nbsp;
{t('Contains {{count}} sub-documents', {
count: childrenCount,
})}
</Text>
) : null}
</>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@AntoLC I was hesitating to create DocHeaderInfoDesktop and DocHeaderInfoMobile components to make this component clearer and more readable. We would just have a bit of props drilling, what do you think?

@github-actions
Copy link

github-actions bot commented Oct 30, 2025

Size Change: +232 B (+0.01%)

Total Size: 3.68 MB

Filename Size Change
apps/impress/out/_next/static/2b04d6d7/_buildManifest.js 0 B -878 B (removed) 🏆
apps/impress/out/_next/static/ffbbb779/_buildManifest.js 877 B +877 B (new file) 🆕

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement improve an existing feature frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants