-
Notifications
You must be signed in to change notification settings - Fork 359
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
Replace jumpMenu controls with menu-button components #2814
base: dev
Are you sure you want to change the base?
Conversation
Okay, I hope I've gotten the ball rolling here. Notes on my progress so far: 1.) I've added a new showSelectedValue setting to the menu-button control, which can be used to include the current selected value in the button, so you don't have to open the menu to see what is selected. I'm sure this could be styled more attractively, but consider this an initial proof-of-concept. 2.) I've converted the two jumpMenu standard search controls (sort/limit) to use menu-button instead. If you turn on limits in searches.ini, you'll see that currently the controls stack on top of each other instead of displaying side-by-side. I'm sure we can fix this by applying appropriate classes or other style changes. Again, this is a proof of concept for now and needs more polish. If @crhallberg and/or @stephanieleary can take this further while I'm on vacation next week, I would be grateful for any assistance! |
@crhallberg / @stephanieleary, I had more time to work on this today, so I finished up all the template conversion and Javascript cleanup. In the process, I added a couple additional new features to the menu-button component -- you can now set arbitrary link attributes (needed for data elements in order to clear the MyResearch AJAX cache), and you can omit the toggleLabel (in case you JUST want to display the value -- useful for the scheduled search controls). The only remaining work is to adjust the styles (since some things still don't look quite right -- particularly the layout of sort/limit controls in search results) and then fix any broken tests. I haven't put any time into tests yet since I expect that some details may change as a result of styling. @crhallberg, can you please try to take a look at styles this week so we can wrap this up? |
For future reference, here are the test failures that will need to be addressed once style is finalized:
|
I took a quick look, and while the components work, there are some issues remaining, some of them obviously down to one's preferences:
|
Thanks, @EreMaijala! I'm hoping that @crhallberg can help with these improvements. Some general notes: 1.) The menu-button component was originally designed for the drop-downs in the VuFind header, and I think the current styles reflect that. It might be a good idea to give the component different default styles, and then override those styles for its appearance in the header. 2.) When I implemented the "show current value" feature, I concatenated the value into the control label because it was the fastest way to finish implementing the functionality, not because I think that's the way it should remain indefinitely. I would strongly encourage @crhallberg to refactor this so that the value is inside a span with a class, and then we can make it look nicer with CSS. I just didn't want to mess with the styles on my own, since I figured @crhallberg would need/want to rewrite anything I did anyway. ;-) 3.) I agree that "drop up" would be a nice feature -- and probably something that wasn't implemented before because of the emphasis on placement in the header up until now. |
I reviewed the test branch in comparison with the dev branch in all three themes. In this comment, I'll focus on two elements on the results view page On dev, the two variable elements (Results per page and Sort) are in boxes that stay at a constant width regardless of the user's selection. The text is left aligned, so there's always some space between the words Author, Title, or Date ascending (etc.) and the down arrow. On test, each box resizes depending on the user's selections. In addition, the text in the box seems to be right aligned, with minimal space between the text and the down arrow, so it seems a bit tight, especially in Bootprint3. (NB: I am assuming that once this branch is merged into dev, the improved emphasis and highlighting behavior around the selected dropdown box or search box will be present.) In my opinion, the design in dev provides a better user experience when the user is actively switching between different sorts. When you change your sort in dev, the contents of the box change, but your eye doesn't have to dart right and left as the length of that element gets shorter and longer. However, if the user sticks with one selection, I think it's slightly easier on the eye to employ the variable lengths based on the length of the sort name. There needs to be adequate padding in each box, though. Sandal and Bootstrap3 are fine, but Bootprint3 is too skimpy in terms of padding In terms of themes, Sandal does the best job of fitting the two elements into a pretty stable rectangle shape. If we could do a tiny bit of nudging for the other two themes, so that things were perfectly aligned between the words Results and Sort on the left, and the edges of the dropdown boxes on the right, that would be great. |
Thanks for the feedback, @sturkel89. This sounds like a job for @crhallberg, if he has a moment to think about the CSS necessary to make this work better. |
I merged the conflicts, but I need the merge work on the SavedSearchesTest checked. |
Thanks, @crhallberg. Let me know if it would be helpful for me to run tests at any point. |
That would be helpful, @demiankatz! I just want to make sure I did the git merge on that one test correctly. I'll take care of the new conflicts now. |
@crhallberg, there are now several failing tests:
Not sure if this is related to merge errors, or if there were also some tests added to dev that need to be adjusted for compatibility with the new logic here. |
@crhallberg, I noticed there were some click calls that could be simplified in the test, so I pushed up an improvement... but that did not change the test failures. Please let me know if you need me to take a deeper look at this! @EreMaijala might also have ideas if you're stuck, since I think he made the most recent test revisions. |
Does someone have a setup for library cards? That part of the code got pretty complex and I'm not setup to test it. |
There are instructions on library card testing here in the wiki. I've been recently trying to build up this manual testing page to help with situations like this one -- already paying off! :-) |
I'm pushing all theme-related PRs that were not finished in time for 10.0 to the 11.0 milestone; it will be easier to finish these if we only have to operate on one theme at a time. I think we should establish a dev-11.0 branch fairly early in the 10.1 development process so that this work can move forward as soon as possible. |
This PR supersedes #2492.
TODO