Skip to content

Add memes options filter to Memes component#43

Open
Pdzly wants to merge 6 commits into
whysodank:masterfrom
Pdzly:feature/only-originals
Open

Add memes options filter to Memes component#43
Pdzly wants to merge 6 commits into
whysodank:masterfrom
Pdzly:feature/only-originals

Conversation

@Pdzly

@Pdzly Pdzly commented May 25, 2025

Copy link
Copy Markdown
Contributor

Introduced a MemesOption component to enable filtering memes based on options like reposts. Updated the Memes component to integrate this feature with query updates, enabling real-time filtering and improved user interaction.

Introduced a MemesOption component to enable filtering memes based on options like reposts. Updated the Memes component to integrate this feature with query updates, enabling real-time filtering and improved user interaction.
@Pdzly

Pdzly commented May 25, 2025

Copy link
Copy Markdown
Contributor Author

grafik

@Pdzly

Pdzly commented May 25, 2025

Copy link
Copy Markdown
Contributor Author

For now i only added the Repost filter. But i intend to add more functions like page size is_original ( see #42 ) etc...

Added `resetMemesOptionState` to clear the form state when the overlay closes, improving component behavior and state management. Removed unnecessary comments and adjusted the Overlay component to include the `onOpenChange` callback.
@isik-kaplan

Copy link
Copy Markdown
Contributor

I was planning on adding this to the end of the category options, to the left top bar - what do you think about adding the filters there and separate the filters (the whole filter container from the category container) by a horizontal separator?

@Pdzly

Pdzly commented May 26, 2025

Copy link
Copy Markdown
Contributor Author

Yeah it is a fitting spot. But i would do it right bound as left bound would look like a little tooo far off and no one would see it

Introduced the MemesOption component in the LeftColumn for better accessibility and removed it from the Memes page. Refactored query handling in MemesOption and Memes components to simplify state management and align with URL search parameters.
: {}
)
setLoading(true)
setPosts([])

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without this it doesnt work.

@isik-kaplan

Copy link
Copy Markdown
Contributor

I was picturing something like this

image

What do you think about having them explicit like this? (With better design of course, maybe not complete "Select Date" components but just a calendar icon with selected date next to it for instance so it is slimmer, or maybe with the existing component like this? With better padding, gaps etc.

Also generally when possible can you use flex + gap instead of margins, especially within a component itself to arrange its children? I think that makes the code consistent.

Or maybe we can have a design where we combine these two options? Instead of opening an Overlay, clicking a filter button toggles this ui directly?

@Pdzly

Pdzly commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

I would say lets go with the combined, as i personally think having that 24/7 is a bit obsessive and unnecessary.

@Pdzly

Pdzly commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

grafik
grafik

Pdzly added 3 commits June 2, 2025 21:24
…ling

Refactored MemesOption by replacing Overlay with Accordion for better UX. Updated query handling in Memes and MemesOption components to synchronize state with URL search parameters more efficiently.
…es component

Introduced a `searchParamsToRecord` utility function to convert URL search parameters into a type-safe record. Refactored query handling in the Memes component to leverage the new utility for cleaner and more consistent state synchronization with URL parameters.
…ure/only-originals

# Conflicts:
#	wsd-frontend/src/components/wsd/Memes/Memes.tsx
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