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

Make note event row height dynamic #3952

Closed
wants to merge 4 commits into from
Closed

Conversation

perryr16
Copy link
Contributor

@perryr16 perryr16 commented Mar 31, 2023

Any background context you want to provide?

NoteEvents are set up as a single line ui-grid. If a Note text exceeds the screen width it will be truncated with a '...'. (It is copyable with a triple click).

What's this PR do?

Attempts to make the ui-grid row height dynamic. Initial research suggests that ui-grid rowHeights cannot be set automatically (reference).

rowHeight can be dynamically set with a function.

const rowHeight = 25 * Math.ceil(note.text.length / 180)

where 25 is the height of a single line and 180 is a rough estimate of number of characters per line on a 1440 px screen (13 inch MacBook). The function could be improved if screen width was taken into consideration.

Alternative Solutions

Instead of working to get row height to be dynamic, we could post a link to the full note on the notes page.

Ultimately this is in need of a more elegant solution

How should this be manually tested?

What are the relevant tickets?

Screenshots (if appropriate)

Old
Screenshot 2023-03-31 at 11 37 11 AM

New
Screenshot 2023-03-31 at 10 56 12 AM

@nllong nllong changed the title Make Note Event row height dynamic Make note event row height dynamic Apr 19, 2023
@perryr16
Copy link
Contributor Author

Needs further consideration

@perryr16 perryr16 closed this Sep 18, 2023
@nllong nllong deleted the note-event-dynamic-height branch September 30, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants