-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix(ui): improve markdown styles for workflow-row, workflow-templates, cluster-workflow-templates, and cron-workflows #13930
base: main
Are you sure you want to change the base?
fix(ui): improve markdown styles for workflow-row, workflow-templates, cluster-workflow-templates, and cron-workflows #13930
Conversation
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
e19d707
to
52a3791
Compare
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
Signed-off-by: stevenbjohnson <[email protected]>
…iption to workflow-drawer Signed-off-by: stevenbjohnson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple nits and a question about DRYing up some repetitive code. Not sure if possible to centralize or if we should.
And we discussed alt tags for mouseover when title/description gets auto-shortened due to overflow. You mentioned it makes the UI very wonky. Follow up for a future PR.
Nice work.
ui/src/cluster-workflow-templates/cluster-workflow-template-markdown.scss
Outdated
Show resolved
Hide resolved
ui/src/cluster-workflow-templates/cluster-workflow-template-markdown.tsx
Outdated
Show resolved
Hide resolved
…for utils function Signed-off-by: stevenbjohnson <[email protected]>
Motivation
These changes are being proposed to improve the
workflows-row
component. With the addition of the.wf-rows-name
class for displaying thetitle
anddescription
annotations, previous styles that handled overflow and text-overflow are being overridden. This results in lengthy titles and descriptions creating wrapped text that renders inconsistently sized workflow-row components and makes details difficult to read.Similarly, there are some markdown text formats that cause the UI to render the
workflow-row
component inconsistently and make the title and description equally as difficult to read.Modifications
workflows-row.scss
styles for the.wf-rows-name
classline-height by 1em
inline-block
displaymiddle
vertical alignment (useless withoutinline-block
)overflow
andtext-overflow
without wrapping (applies to all child elements, as well)Before Change:
After Change:
workflows-list__timestamp
class, ensuring times remain aligned inworkflows-row
when not ISO format (the above changes will create misalignment when atitle
anddescription
are present)Before Change:
After Change:
EscapeInvalidMarkdown()
to prevent markdown text formats that cause large variances inworkflow-row
sizing, as well as complicate readability (markdown that starts with a header, blockquotes, or list items will have characters removed):Supported formatting:
**…**
)_…_
OR*…*
)~…~
)`…`
)[…](URL)
)Not supported formatting:
__…__
)#
)-#
)-
OR*
)\n
OR|
)```…```
)>
)DESCRIPTION
section to theworkflow-drawer
component that will render the unescaped markdown from thetitle
anddescription
for users to view the full values input when truncated in theworkflow-row
Verification
Changes were tested in and verified in a dev container, running the UI and submitting workflows with a variety of title/description combinations:
UPDATE:
This formatting logic and component rendering has been added to support the recent changes to CronWorkflows, WorkflowTemplates, and ClusterWorkflowTemplates
INFO
and show any user-added markdown