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: totally hide strict filters #948

Merged
merged 26 commits into from
Jan 23, 2023
Merged

Conversation

ayoayco
Copy link
Member

@ayoayco ayoayco commented Jan 10, 2023

As discussed on the #ux channel, there is more demand to totally hide filtered posts when the FilterAction is 'hide'

This PR will

  1. remove displaying "Removed by filter: phrase' from the StatusCard component
  2. implement context for the paginator
  3. implement filtering logic in the reorderedTimeline function
  4. add tests of filtering scenarios for reorderedTimeline function

Changes 2-4 are needed for when the feature virtualScroller is true, because it adds an empty DynamicScroller

Also, some initial styling fix for warning filters if it is a DM:

before after
Screenshot 2023-01-21 at 9 29 16 PM Screenshot 2023-01-21 at 9 45 44 PM

Handle contexts:

  • Home and lists
  • Notifications
  • Public timelines
  • Conversations
  • Profiles

@stackblitz
Copy link

stackblitz bot commented Jan 10, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Jan 10, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit eac0590
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/63cedfdcf4b5f10008b2eea1

@netlify
Copy link

netlify bot commented Jan 10, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit eac0590
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/63cedfdc6d7f440008c8e108
😎 Deploy Preview https://deploy-preview-948--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ayoayco ayoayco marked this pull request as ready for review January 10, 2023 19:14
composables/timeline.ts Outdated Show resolved Hide resolved
@patak-dev
Copy link
Member

I like that once preprocessed, we avoid dealing with these posts. One issue here is that if the user changes a strict filter, then a reload is needed to show these posts but I think the tradeoff is ok here.

@ayoayco ayoayco self-assigned this Jan 11, 2023
@ayoayco
Copy link
Member Author

ayoayco commented Jan 11, 2023

This branch already works (so if there's more demand it can be merged), but I plan to refactor it.

You can compose the strict filter and the reorderTimeline and pass it as a single param to avoid the need of passing the context all the way down

I'm looking to implement this suggestion in the previous comment by @patak-dev

@patak-dev
Copy link
Member

Lets do the refactoring first, no rush

@ayoayco ayoayco marked this pull request as draft January 21, 2023 08:59
@ayoayco ayoayco marked this pull request as ready for review January 21, 2023 22:01
@patak-dev patak-dev merged commit a08f566 into main Jan 23, 2023
@patak-dev patak-dev deleted the feat/totally-hide-strict-filters branch January 23, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants