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: post search adapted with global search #4019

Merged
merged 3 commits into from
Sep 19, 2024
Merged

feat: post search adapted with global search #4019

merged 3 commits into from
Sep 19, 2024

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Sep 10, 2024

Part of the 2.0 milestone

Changes proposed in this pull request:

  • Adds searching of posts
    • A new search source in the search modal
    • A new page dedicated to post search results (which could technically also be viewed without search when directly going to the link /posts)
    • When a discussion, or user posts, or user liked posts, or user mentioned posts page is currently open, the search modal automatically selects the post search tab and automatically selects the correct filter in context to the current page.

Screenshot
image

image
image
image
image
image

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@SychO9 SychO9 added this to the 2.0 milestone Sep 10, 2024
@SychO9 SychO9 requested a review from a team as a code owner September 10, 2024 17:11
@luceos
Copy link
Member

luceos commented Sep 12, 2024

Why is the implementation of author different than the other related to users? I feel like their use should be identical or at least similar in such a way that instead of relying on users to know IDs, we use usernames.

@SychO9
Copy link
Member Author

SychO9 commented Sep 13, 2024

That's how the filter was implemented prior to this. I think these user filters should all support username and ID, and in the UI default to use the username, in the future we will likely add something to allow hiding usernames which is why ID still matters.

will modify them as such.

@SychO9
Copy link
Member Author

SychO9 commented Sep 17, 2024

updated

image
image

@luceos
Copy link
Member

luceos commented Sep 18, 2024

If this works, I'd say start merging everything in whenever it suits you and we'll start testing end-to-end when you give the sign.

💪 Excellent work, also from @iamdarkle. Really looks awesome.

@SychO9 SychO9 merged commit 1ab3029 into 2.x Sep 19, 2024
25 checks passed
@SychO9 SychO9 deleted the sm/post-search branch September 19, 2024 16:02
@SychO9 SychO9 self-assigned this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants