Skip to content

Conversation

@dmitrytrager
Copy link
Collaborator

@dmitrytrager dmitrytrager commented Feb 5, 2025

What Issue Does This PR Cover, If Any?

Resolves #19

What Changed? And Why Did It Change?

This PR Introduces form for topic search.
For now it requires pushing "Submit" button, but later I will try to make it work without.
We use existing GET topics route here and several attributes to filter for

How Has This Been Tested?

Added new request specs for GET topics with different search options

Please Provide Screenshots

Screenshot 2025-02-05 at 16 21 12

Additional Comments

One more thing we can do here is to introduce choices for new selectors that we have. But probably it is better to add separate issues for that

@dmitrytrager dmitrytrager force-pushed the topic-search-filtering-19 branch from ba5862f to bd76035 Compare February 5, 2025 15:38
@dmitrytrager dmitrytrager marked this pull request as ready for review February 6, 2025 09:25
else
Topic.active
end
Current.user.topics
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since we should filter by state, all topics are available for admins.
But for regular user only topics from his providers are available

params.require(:topic).permit(:title, :description, :uid, :language_id, :provider_id)
end

helper_method :search_params
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We want to use these params for view

@dcollie2 dcollie2 merged commit a846218 into main Feb 10, 2025
4 checks passed
@dcollie2 dcollie2 deleted the topic-search-filtering-19 branch February 10, 2025 12:50
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.

Topic Search & Filtering

3 participants