-
Notifications
You must be signed in to change notification settings - Fork 43
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
🐛 Update the TrackerStatus
popover to handle long error messages
#1079
Conversation
Screencap overviewscreencast-localhost_9000-2023.06.29-17_55_05.mp4ScreenshotsLong error message (the same one displayed in #1067 (comment)) initially displayed with truncated content: Long error message with expanded content (scrolled to the end of content): |
Hmm, I wonder if we can do anything better than display the HTML to the user? we could clean it with something like sanitize-html and render it, but then we'd get a "Go to Jira home" link in it that we don't want the user to click. I guess any further parsing of that HTML means we're hard-coding assumptions about the response body from Jira. We could disallow/remove Maybe nothing to be done, just thinking out loud |
I'd rather have the backend save a meaningful erorr message instead of the full HTTP response when it encounters a 403 response code trying to connect to a service. I see this change as a stop-gap until the error message can make sense to an end user. See #1067 (comment) |
Since a "Not connected" error message can be an unlimited length, update the popover such that: - The width will be between 30em and 50em - The message height itself will be a maximum of 450px tall - Message content will overflow with scroll bars as needed - If the message is longer than 300 characters, an expandable toggle is added to the code block header to allow showing the message in full These changes should allow long messages to be displayed in a reasonable way. Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
50e00b6
to
a4c5efd
Compare
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #1079 +/- ##
=======================================
Coverage 46.91% 46.91%
=======================================
Files 177 177
Lines 4442 4442
Branches 1027 1027
=======================================
Hits 2084 2084
Misses 2285 2285
Partials 73 73
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Agreed, that would be better. Sounds good for a stopgap. |
Since a Jira tracker "Not connected" error message can be an unlimited length, update the popover such that:
These changes should allow long messages to be displayed in a reasonable way.
Resolves: #1067