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: filter markdown by query [5164] #2752

Merged
merged 16 commits into from
Mar 7, 2024
Merged

Conversation

Garzas
Copy link
Contributor

@Garzas Garzas commented Feb 29, 2024


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  • Structured Markdown Representation: The application needed a more structured way to handle markdown content to improve readability and maintainability, and to ease UI rendering.
  • Markdown Content Searchability: There was a need to filter and display markdown content based on user searches, showing only relevant parts of the documents.
  • Enhanced Display for Links and Lists: Improvements were needed in how links and lists are displayed within markdown content, especially in the context of search results.

Causes (Optional)

  • The flat structure used for markdown representation made it hard to map content to UI components directly, complicating rendering and interactions.
  • Users couldn't easily search within markdown documents, and even when possible, the context around search hits wasn't adequately presented.
  • Lists and links within markdown didn't always render in a user-friendly manner, especially after applying filters or searches, leading to a disjointed user experience.

Solutions

  • New Classes for Markdown: Introduced a set of classes for a structured representation of markdown documents. This hierarchical approach mirrors the markdown's structure, facilitating direct mapping to UI components and improving code readability.
  • Filtering and Summarization: Implemented advanced filtering for search queries within markdown content. The solution includes summarizing the content around search hits with ellipses for trimmed sections, ensuring users can understand the context of their search results.
  • UI Enhancements for Lists and Links: Made specific adjustments for a more intuitive display of links and list items. This includes preserving the original order in lists, even in filtered views, and ensuring links are interactive and visually distinct. These changes aim to enhance the clarity and usability of markdown content in the UI.

Attachments (Optional)

markdown_preview

@Garzas Garzas self-assigned this Feb 29, 2024
Copy link

Ups 🫰🟨

This PR is too big. Please try to break it up into smaller PRs.

Copy link
Contributor

github-actions bot commented Feb 29, 2024

Test Results

855 tests  +28   855 ✅ +28   10m 39s ⏱️ + 2m 2s
116 suites + 1     0 💤 ± 0 
116 files   + 1     0 ❌ ± 0 

Results for commit bffe3ea. ± Comparison against base commit 42d82dd.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

Attention: Patch coverage is 52.13115% with 146 lines in your changes are missing coverage. Please review.

Project coverage is 43.47%. Comparing base (42d82dd) to head (bffe3ea).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2752      +/-   ##
===========================================
+ Coverage    43.03%   43.47%   +0.43%     
===========================================
  Files          409      411       +2     
  Lines        13579    13845     +266     
  Branches      2399     2516     +117     
===========================================
+ Hits          5844     6019     +175     
- Misses        7055     7120      +65     
- Partials       680      706      +26     
Files Coverage Δ
.../wire/android/ui/home/conversations/MessageItem.kt 0.00% <ø> (ø)
...ndroid/ui/home/conversations/model/MessageTypes.kt 85.00% <ø> (ø)
...ui/home/conversations/model/MessageTypesPreview.kt 0.00% <ø> (ø)
...wire/android/mapper/RegularMessageContentMapper.kt 19.20% <0.00%> (-0.13%) ⬇️
...e/android/ui/home/conversations/model/UIMessage.kt 49.55% <0.00%> (ø)
...otlin/com/wire/android/ui/markdown/MarkdownNode.kt 97.26% <97.26%> (ø)
...tlin/com/wire/android/ui/markdown/MarkdownTable.kt 0.00% <0.00%> (ø)
...n/com/wire/android/ui/markdown/MarkdownComposer.kt 0.00% <0.00%> (ø)
...lin/com/wire/android/ui/markdown/MarkdownHelper.kt 48.61% <48.61%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42d82dd...bffe3ea. Read the comment docs.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 3397 succeeded.

The build produced the following APK's:

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 3409 failed.

@Garzas Garzas requested a review from saleniuk March 1, 2024 08:33
Copy link
Contributor

github-actions bot commented Mar 1, 2024

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 3419 succeeded.

The build produced the following APK's:

Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

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

Just small comments and suggestions. Superb work, I like the expressiveness of the Markdown model now.

@Garzas Garzas requested a review from yamilmedina March 1, 2024 11:51
Copy link
Contributor

github-actions bot commented Mar 1, 2024

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 3435 succeeded.

The build produced the following APK's:

@Garzas Garzas added this pull request to the merge queue Mar 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 1, 2024
Copy link
Contributor

github-actions bot commented Mar 7, 2024

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 3494 succeeded.

The build produced the following APK's:

@Garzas Garzas added this pull request to the merge queue Mar 7, 2024
Merged via the queue into develop with commit 94d9786 Mar 7, 2024
14 checks passed
@Garzas Garzas deleted the feat/filter-markdown-by-query branch March 7, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants