add: objectName in fav folder (#8785)
Closes: #8549 It was quite complex to get this right. So, I went through Notion's website to see how they implemented it. Instead of using `display: none` or having a space reserved for the Icon, I used clip-path & opacity trick to achieve the desired behaviour. This maintains accessibility and helps in label or ObjectName to take the full space. Also, truncation now works for label & objectName as a whole instead of separately, as seen in my previous PR. **Caveats** The only problem that now remains is not having `NavigationDrawerAnimatedCollapseWrapper`. Having it on top of any text or div won't let the flex or truncation property work. [Screencast from 2024-11-28 13-37-31.webm](https://github.com/user-attachments/assets/29255cd2-3f15-4b1d-b1e1-c041c70052e5) --------- Co-authored-by: ehconitin <nitinkoche03@gmail.com> Co-authored-by: martmull <martmull@hotmail.fr>
This commit is contained in:
@ -173,6 +173,7 @@ export const CurrentWorkspaceMemberFavorites = ({
|
||||
itemComponent={
|
||||
<NavigationDrawerSubItem
|
||||
label={favorite.labelIdentifier}
|
||||
objectName={favorite.objectNameSingular}
|
||||
Icon={() => <FavoriteIcon favorite={favorite} />}
|
||||
to={favorite.link}
|
||||
active={index === selectedFavoriteIndex}
|
||||
|
||||
@ -59,6 +59,7 @@ export const CurrentWorkspaceMemberOrphanFavorites = () => {
|
||||
accent="tertiary"
|
||||
/>
|
||||
}
|
||||
objectName={favorite.objectNameSingular}
|
||||
isDragging={isDragging}
|
||||
/>
|
||||
</StyledOrphanFavoritesContainer>
|
||||
|
||||
Reference in New Issue
Block a user