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

feat(issue-views): Add character limits on tab titles #77883

Merged

Conversation

MichaelSun48
Copy link
Member

Adds "soft" and hard limits to the number of characters in the tab titles to prevent any weird behavior. The hard limit is 128 characters since this is the max character length enforced by the database schema. The soft character limit is approximately 50 characters, and a tooltip showing the full title will appear on hover if the tab title exceeds the maximum width.

Screen.Recording.2024-09-20.at.4.42.14.PM.mov

@MichaelSun48 MichaelSun48 requested a review from a team as a code owner September 20, 2024 23:43
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 20, 2024
Copy link

codecov bot commented Sep 21, 2024

Codecov Report

Attention: Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...issueList/groupSearchViewTabs/editableTabTitle.tsx 11.11% 8 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #77883   +/-   ##
=======================================
  Coverage   78.12%   78.12%           
=======================================
  Files        6996     6996           
  Lines      310241   310243    +2     
  Branches    50763    50763           
=======================================
+ Hits       242363   242366    +3     
  Misses      56145    56145           
+ Partials    11733    11732    -1     

@MichaelSun48 MichaelSun48 merged commit e8d991b into master Sep 23, 2024
43 of 44 checks passed
@MichaelSun48 MichaelSun48 deleted the msun/issueViews/enforceSoftAndHardLimitsOnTabTitle branch September 23, 2024 17:40
@MichaelSun48 MichaelSun48 added the Trigger: Revert add to a merged PR to revert it (skips CI) label Sep 23, 2024
@getsentry-bot
Copy link
Contributor

PR reverted: 84813e6

getsentry-bot added a commit that referenced this pull request Sep 23, 2024
This reverts commit e8d991b.

Co-authored-by: MichaelSun48 <55160142+MichaelSun48@users.noreply.github.com>
MichaelSun48 added a commit that referenced this pull request Sep 23, 2024
This PR is nearly identical to [this previous
PR](#77883) that I reverted
because of an unexpected visual bug that occurred because of a conflict
with another PR. (specifically [this
one](#77890) that added
animation wrappers over the tab title)

The behavior is identical to the previous PR, see that one for a visual
demo.


This PR also fixes an unrelated bug with the duplicate functionality.
Previously, clicking on the "Duplicate" action for a tab would flash the
Add View page before going back to the issue stream. This happened
because the add view page is automatically triggered when the search's
viewId begins with a "_", indicating a tab that has not been persisted
on our backend yet.
harshithadurai pushed a commit that referenced this pull request Sep 24, 2024
Adds "soft" and hard limits to the number of characters in the tab
titles to prevent any weird behavior. The hard limit is 128 characters
since this is the max character length enforced by the database schema.
The soft character limit is approximately 50 characters, and a tooltip
showing the full title will appear on hover if the tab title exceeds the
maximum width.



https://github.com/user-attachments/assets/72f47938-5ecf-4ed3-820b-9302a4260cec
harshithadurai pushed a commit that referenced this pull request Sep 24, 2024
This reverts commit e8d991b.

Co-authored-by: MichaelSun48 <55160142+MichaelSun48@users.noreply.github.com>
harshithadurai pushed a commit that referenced this pull request Sep 24, 2024
This PR is nearly identical to [this previous
PR](#77883) that I reverted
because of an unexpected visual bug that occurred because of a conflict
with another PR. (specifically [this
one](#77890) that added
animation wrappers over the tab title)

The behavior is identical to the previous PR, see that one for a visual
demo.


This PR also fixes an unrelated bug with the duplicate functionality.
Previously, clicking on the "Duplicate" action for a tab would flash the
Add View page before going back to the issue stream. This happened
because the add view page is automatically triggered when the search's
viewId begins with a "_", indicating a tab that has not been persisted
on our backend yet.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components Trigger: Revert add to a merged PR to revert it (skips CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants