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

Date Created Sidebar Facet Does Not Function Expected #3321

Closed
aseyedia opened this issue Sep 11, 2024 · 6 comments
Closed

Date Created Sidebar Facet Does Not Function Expected #3321

aseyedia opened this issue Sep 11, 2024 · 6 comments
Labels
bug needs triage New issue needs triage and/or scheduling

Comments

@aseyedia
Copy link
Contributor

aseyedia commented Sep 11, 2024

Describe the bug

We are using a custom Discovery Search Filter based on dc.date.created:

    <bean id="searchFilterCreated" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
        <property name="indexFieldName" value="dateCreated"/>
        <property name="metadataFields">
            <list>
                <value>dc.date.created</value>
            </list>
        </property>
        <property name="type" value="date"/>
        <property name="facetLimit" value="5"/>
        <property name="sortOrderSidebar" value="COUNT"/>
        <property name="sortOrderFilterPage" value="COUNT"/>
        <property name="isOpenByDefault" value="false"/>
        <property name="pageSize" value="10"/>
        <property name="exposeMinAndMaxValue" value="true"/>
    </bean>

On the Search page, this facet appears:

image
  1. We would like to set the minimum year to something other than 1950 but it's not clear how.
  2. If we change the year text, for example, if we change 1950 to basically any other year but let's just say 2020, and then hit enter, the page will just start loading and never stop. The URL doesn't change either. It just loads, permanently. (This is the main issue we are facing).
  3. We would like more control over the binning of the years, since our entries do not date before 2015.
  4. The slider does not wait until the user releases control of the mouse to enter the query; it immediately searches once the slider stops. This makes precision control more difficult.
  5. The slider acts finnicky when trying to select 1-year long intervals i.e. 2022-2023, for example.

To Reproduce

Steps to reproduce the behavior:

  1. Set a dc.date.created Search Filter Facet
  2. Try to set the years inside of the year fields and press enter

Expected behavior

Pressing enter would return the search-filtered query.

@aseyedia aseyedia added bug needs triage New issue needs triage and/or scheduling labels Sep 11, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Sep 11, 2024
@aseyedia
Copy link
Contributor Author

aseyedia commented Sep 11, 2024

To fix the issue of not being able to set the minimum year, I went ahead and changed the default, fallback year to 2015.

aseyedia added a commit to aseyedia/dspace-angular that referenced this issue Sep 11, 2024
@tdonohue
Copy link
Member

I believe this is a duplicate of #1723, which is waiting on a volunteer. We all agree the default minimum date should somehow be more configurable or dynamic.

@aseyedia aseyedia mentioned this issue Sep 11, 2024
12 tasks
@aseyedia
Copy link
Contributor Author

Looks like the issue with "clicking away" was already addressed in the latest commit for the descendant of this component here with the removal of the blur parameter:

56ba23f#diff-66188afad0c5a4217693eb10cbef3efd0df661c7a32921a6b1e2b60ecf7c7e8bL11-L23

Curious that they kept [dsDebounce]="250" (change)="onSliderChange($event)":

56ba23f#diff-66188afad0c5a4217693eb10cbef3efd0df661c7a32921a6b1e2b60ecf7c7e8bR36-R37

@aseyedia
Copy link
Contributor Author

I think this issue is more-or-less resolved. I will keep it open for future review but I feel like I was able to find a solution to my problem(s).

@tdonohue
Copy link
Member

@aseyedia : If this ticket is resolved, then does that mean your PR #3323 was unnecessary? I'm a little confused as to whether you've found that these issues were fixed by #3236 (the recent work you referenced above), or if you still found new bugs?

Ideally, if this ticket is "resolved" we should close it and its PR. It can always be reopened later if we find a reason to do so.

@aseyedia
Copy link
Contributor Author

aseyedia commented Sep 11, 2024

@tdonohue Apologies, allow me to clarify:

In this issue, I (maybe confusingly) outlined a number of small and related issues I had around the "date sidebar search facet."

When I posted #3321 (comment), I was under the impression that #3236 fixed the "clicking away" issue but not the "slider prematurely submitting query" issue. Now I am realizing that even the issue with the slider behavior was resolved. #3236 resolved all of my issues and we can close both this ticket and the PR #3323. Thank you for checking with me.

@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done / Closed in DSpace Backlog Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage New issue needs triage and/or scheduling
Projects
Status: Done / Closed
Development

Successfully merging a pull request may close this issue.

2 participants