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

Markdown support in the pinned items #31251

Merged
merged 82 commits into from
Jun 21, 2023
Merged

Conversation

kamilmielnik
Copy link
Contributor

@kamilmielnik kamilmielnik commented Jun 1, 2023

Closes #30381

I found the following issues while working on this:

Description

Adds markdown support in tooltips in pinned items.

How to verify

  1. Create a:
    • Dashboard
    • Model
    • Question
  2. Add description to it:
    • markdown with short / long text
    • plain text with short / long text
  3. Pin it to a dashboard
  4. If it's a question, turn the visualization on and off
  5. In the pinned item hover the text description (or description icon) to display the tooltip - it should show markdown without headings and links formatted
  6. If there is a description block in the card, it should contain only the first description line with markdown formatting removed

To verify skeletons, check out the description tooltip when card is loading. To keep it in that state forever you can block requests to api/card/*/query URL in your developer tools.

Demo

Before

before.mp4

After

after.mp4

- Consistently destructure all imports from react package
- Refactor getMarkdownFirstLine into getLeadingText
@kamilmielnik kamilmielnik self-assigned this Jun 1, 2023
@kamilmielnik kamilmielnik changed the title 30381 markdown in pinned items Markdown support in the pinned items Jun 1, 2023
@kamilmielnik
Copy link
Contributor Author

kamilmielnik commented Jun 16, 2023

Is it solvable by white-space: pre?

pre breaks ellipsis but pre-line does the job, thank you!
I updated the description with new videos - now there's an ... shown when ellipsis is applied.
Ready for review @alxnddr.

Copy link
Member

@alxnddr alxnddr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Please check out a couple of minor comments before merging

@kamilmielnik kamilmielnik enabled auto-merge (squash) June 21, 2023 06:23
@kamilmielnik kamilmielnik merged commit b92caa6 into master Jun 21, 2023
91 of 92 checks passed
@kamilmielnik kamilmielnik deleted the 30381-markdown-in-pinned-items branch June 21, 2023 08:29
@kamilmielnik kamilmielnik added the backport Automatically create PR on current release branch on merge label Jun 21, 2023
@github-actions
Copy link

@kamilmielnik could not create a backport due to conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge visual Run Percy visual testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markdown support in the pinned items
3 participants