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

Display jump links above combined search results #3083

Merged
merged 18 commits into from
Sep 28, 2023

Conversation

maccabeelevine
Copy link
Member

The idea here is to optionally provide a sort of table-of-contents above combined search results, each item a jump link within the page to the bento box below.

Inspiration examples from USC:
usc

and Cornell discovery layers:
cornell

@maccabeelevine
Copy link
Member Author

Here is a first take on the idea for boostrap3. Some styling advice would be welcome. It probably needs at least some surrounding box similar to the facet and search result summaries above.

Screenshot 2023-09-08 171035

@maccabeelevine
Copy link
Member Author

Updated screenshot, I added record counts to each jump link, similar to one of the examples.

Screenshot 2023-09-11 135210

@maccabeelevine maccabeelevine marked this pull request as ready for review September 11, 2023 18:45
Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

I'm short on time so haven't given this a very deep review yet, but I did notice one thing that might be easy to improve.

Also, in line with my comments on an earlier PR, have you tested that this works with AJAX-loaded content? I see you do have some Javascript here, but it wasn't clear to me at a glance if that would handle the AJAX situation or if it was for a different purpose.

I'd also be interested to hear @crhallberg's thoughts on the aesthetic side of things. I might have opinions of my own when I have time to try this hands-on as well, but that may be a little while, and I thought I might as well share my initial thoughts in the meantime.

@maccabeelevine
Copy link
Member Author

Also, in line with my comments on an earlier PR, have you tested that this works with AJAX-loaded content? I see you do have some Javascript here, but it wasn't clear to me at a glance if that would handle the AJAX situation or if it was for a different purpose.

@demiankatz If I understand the question, yes it does work with both ajax=true and ajax=false modules defined in combined.ini (and a mix of both).

I'd also be interested to hear @crhallberg's thoughts on the aesthetic side of things. I might have opinions of my own when I have time to try this hands-on as well, but that may be a little while, and I thought I might as well share my initial thoughts in the meantime.

Yes please @crhallberg and others. I didn't spend any time really on aesthetics yet because I don't know how "far" to go with it. I.e. I think the two non-VuFind examples I provided look great, but neither would be consistent with bootstrap3's general design. Suggestions please.

@maccabeelevine
Copy link
Member Author

I noticed yesterday this doesn't work right for sections with a filter. Working on that this morning.

@maccabeelevine
Copy link
Member Author

I noticed yesterday this doesn't work right for sections with a filter. Working on that this morning.

Fixed.

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Thanks, @maccabeelevine -- I finally had time to look more closely at this, and I spotted one significant bug and one possible optional improvement.

Additionally, I notice that the jump links have no left margin, at least in the bootprint3 theme; that might be worth adjusting too:

image

Since this adds a new language string, we're really brushing up against the translation file freeze for release 9.1. If it's important to you to get this included in that release, maybe we can merge the new language string independently of the rest of the code so that it can be included in the translation process while giving us more time to work through the remaining issues here. What do you think?

@maccabeelevine
Copy link
Member Author

Since this adds a new language string, we're really brushing up against the translation file freeze for release 9.1. If it's important to you to get this included in that release, maybe we can merge the new language string independently of the rest of the code so that it can be included in the translation process while giving us more time to work through the remaining issues here. What do you think?

Good idea. I've pulled out the translation as #3119.

@demiankatz demiankatz added this to the 9.1 milestone Sep 22, 2023
@maccabeelevine
Copy link
Member Author

Additionally, I notice that the jump links have no left margin, at least in the bootprint3 theme; that might be worth adjusting too

@demiankatz Yes that's true, I hadn't really tried to make it look good initially:

I didn't spend any time really on aesthetics yet because I don't know how "far" to go with it. I.e. I think the two non-VuFind examples I provided look great, but neither would be consistent with bootstrap3's general design. Suggestions please.

But I should have at least done something clean to start. I've given it some side margins. I also stopped it from wrapping within a single jump link. Current look:

image

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Looks good to me! As with #3077, I recommend leaving this open another couple of days in case @crhallberg has anything to add before leaving on vacation. :-)

Copy link
Contributor

@crhallberg crhallberg left a comment

Choose a reason for hiding this comment

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

There's an AJAX bug holding this PR back, where we need to add this to the viewParams on line 125 of the CombinedController.

'domId' => 'combined_' . str_replace(':', '____', $sectionId),

@demiankatz
Copy link
Member

demiankatz commented Sep 28, 2023

Thanks for catching that, @crhallberg -- I thought @maccabeelevine and I had both tested the scenario that caused this bug (an ajax-loaded filtered column), but it appears that we missed that edge. I've confirmed that merging your fix corrects the underlying problem (which was causing the count of the filtered column to appear next to the unfiltered column instead of its proper place), so I'm going to dismiss your review as completed and merge this now.

@demiankatz demiankatz dismissed crhallberg’s stale review September 28, 2023 12:32

Problem has been addressed.

@demiankatz demiankatz merged commit ca5b8ac into vufind-org:dev Sep 28, 2023
@maccabeelevine
Copy link
Member Author

Thanks @crhallberg for catching that and the fix!

@maccabeelevine maccabeelevine deleted the combined-jump-links branch September 28, 2023 12:44
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.

3 participants