Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active view highlight is not working when object name contains multiple words #9382

Closed
charlesBochet opened this issue Jan 6, 2025 · 0 comments · Fixed by #9394
Closed
Labels
scope: front Issues that are affecting the frontend side only size: short

Comments

@charlesBochet
Copy link
Member

charlesBochet commented Jan 6, 2025

Bug Description

See here:
Image

I'm on "Guillim' Board" but "Charles' Board" is selected in the navigation bar (because it's the first item)

Expected behavior

The right view should be selected

Technical inputs

I believe this is because of the case in url being not consistent with what is expected by the navbar: the navbar is expecting a slugified kebab-case version. We should just use the objectMetadata.name everywhere without reworking it (probalby remove any slugify logic)
For this example: https://twenty-eng.twenty.com/objects/projectItems?view=c8a7455d-0f90-4596-a594-6c5b4850a3b0

@charlesBochet charlesBochet added scope: front Issues that are affecting the frontend side only size: short labels Jan 6, 2025
charlesBochet pushed a commit that referenced this issue Jan 7, 2025
…9394)

# Introduction
Please find related ticket here #9382
To fix the issue the solution seems to be to stop searching for last
viewed `objectMetadata` using their slugged version `namePlural`

## Upcoming cleanup
After discussing with @charlesBochet it seems like a bad practice to
slug the `objectMetadata`, in this way in a following PR we will suggest
a cleanup of the remaining method that does within the
`useFilteredObjectMetadataItems.ts`

## Conclusion
As always any suggestions are welcomed !
Please let me know

closes #9382

---------

Co-authored-by: Paul Rastoin <[email protected]>
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Product development ✅ Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: front Issues that are affecting the frontend side only size: short
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant