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

only add Display Search Facets to the Homepage #2275

Merged

Conversation

GauravD2t
Copy link
Contributor

@GauravD2t GauravD2t commented May 30, 2023

References

Add references/links to any related issues or PRs. These may include:

Description

This PR adds Search filters to the Homepage (only). Search filters for Community/Collection pages was split off into #2732

Enabled by default, but can be disabled via this new configuration in config.yml:

homePage:
  # Enable or disable the Discover filters on the homepage
  showDiscoverFilters: true/false

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue added component: Discovery related to discovery search or browse system new feature labels May 30, 2023
@tdonohue tdonohue added this to the 7.6 milestone May 30, 2023
@GauravD2t GauravD2t closed this Feb 16, 2024
@GauravD2t GauravD2t force-pushed the Search-Facets-home-community-collection branch from 9bfc103 to 0551229 Compare February 16, 2024 03:52
@GauravD2t GauravD2t reopened this Feb 16, 2024
@tdonohue tdonohue added 1 APPROVAL pull request only requires a single approval to merge and removed low priority labels Feb 16, 2024
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

Hi @GauravD2t : I gave this another look/test today. It's working, but some of the prior feedback has still not been addressed and tests are failing. Overall, this is looking much better and seems nearly ready... we just need to have an option to disable it.

  1. In his review, @artlowel noted that we should provide an option to disable this feature as not all sites will want these facets on the homepage. I had also mentioned that in the original design discussion in this comment on the original ticket. I've copied my comment below:
    • "I also want to note that there are potential performance concerns with putting too much content on the homepage. At the very least, this feature needs to be possible to disable if it exists on the homepage."
    • To fix this issue, I'd recommend adding a new config similar to this:
      # This section already exists in `config.example.yml`
      homePage:
        # Enable or disable the Discover filters on the homepage
        showDiscoverFilters: true/false
      
  2. Minor issue: I've noted the lines below where tests are failing and how to fix them.
  3. Minor issue: There's a misalignment of code issue that I noted previously in search-filter.component.html. It looks like you can simply undo all changes to that file...as the only changes are to accidentally misalign the code (making the code harder to read)

Overall, this is looking good & I thank you for your hard work here.

@tdonohue tdonohue self-requested a review February 21, 2024 20:52
@tdonohue tdonohue added this to the 8.0 milestone Feb 21, 2024
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

@GauravD2t : Thanks for your hard work on this! I'm nearly a +1 as I can verify this is working properly. However, currently our automatic accessibility tests are failing on the homepage because the "Discover" header is an <h3> when it expects an <h2> (as there's no <h2> heading above that <h3>). I think we should try to find a way to fix this within this PR if possible. (If somehow this is too difficult, we could also consider temporarily disabling the failing accessibility test -- but I'm hopeful we won't need to do that.)

More information on the accessibility error inline below.

Copy link
Member

@artlowel artlowel left a comment

Choose a reason for hiding this comment

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

Thanks @GauravD2t

The new configuration option works for me, but I would still disable the feature by default. I'm not a fan of how it makes the homepage take up the full width of the window either

@tdonohue
Copy link
Member

@GauravD2t : Could you change the configuration so that this feature is disabled by default as requested by @artlowel above? Thanks. I'll try to give this another test today to make sure my feedback has been addressed.

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

@GauravD2t : Thanks for the updates. I've given this a test today & all my prior feedback has been addressed. I think the final step is to disable this by default (as @artlowel requested above). I've added some notes inline on where those minor changes are necessary.

After these changes are made, I'll give it a final look & then squash merge it (so that it goes in as one commit instead of 70+). Thanks!

config/config.example.yml Outdated Show resolved Hide resolved
src/config/default-app-config.ts Outdated Show resolved Hide resolved
src/config/homepage-config.interface.ts Outdated Show resolved Hide resolved
@tdonohue tdonohue self-requested a review February 23, 2024 21:06
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @GauravD2t ! This all looks good to me now. Merging.

@tdonohue tdonohue dismissed artlowel’s stale review February 23, 2024 21:59

Feedback was addressed. Disabled by default.

@tdonohue tdonohue merged commit bfeeeac into DSpace:main Feb 23, 2024
11 checks passed
@alexandrevryghem alexandrevryghem mentioned this pull request Feb 29, 2024
8 tasks
4science-it pushed a commit to 4Science/dspace-angular that referenced this pull request Sep 18, 2024
[DSC-1893] item-alert: hide redirect to home button for administrators

Approved-by: Francesco Molinaro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge component: Discovery related to discovery search or browse system new feature
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Display Search Facets on all Home, Community, and Collection pages
3 participants