Skip to content

Add default saved search - #127

Open
moozzi wants to merge 1 commit into
hackorum-dev:mainfrom
moozzi:default_search
Open

Add default saved search#127
moozzi wants to merge 1 commit into
hackorum-dev:mainfrom
moozzi:default_search

Conversation

@moozzi

@moozzi moozzi commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

It's my proposition for #121

@dutow dutow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! I added two comments which I think needs some improvement, but otherwise looks good


def index
if user_signed_in? && request.format.html? && params[:cursor].blank? && params[:commit].blank?
default_search = current_user.default_saved_search

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This makes the default view showing everything very difficult to access, we should have an easy way (button/link) that brings users back to the.

We can also get a ui-issue that since the default search is a saved search, it will show up as a badge at the top, where you can click on the "X" button that redirect to the index, which will redirect back again to the same saved search.

Maybe one solution could be that we make the root "/" URL dependent on this (maybe even make / explicitly redirect to /topics or the saved search), and that way clicking on the hackorum logo always would bring up the user's preferred home page, while clicking on topics will always bring up the entire index?

end

def set_default
saved_search = SavedSearch.visible_to(current_user).find(params[:saved_search_id])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

either this has to restrict selection to non-team saved searches, or the redirect has to handle adding the team id

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