-
Notifications
You must be signed in to change notification settings - Fork 29
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
Field guide modal #637
Field guide modal #637
Conversation
c12e81f
to
b3069e0
Compare
My project 1233 has a field guide. The default project loaded by the classifier does not. |
I don't have this setup for the light/dark themes yet. This is an already large PR so I'll note in an issue. |
This also has the issue of the size of the modal changing between the full list of items and selected item. I haven't come up with a better way to have it be responsive and have a max-width yet... |
Testing this out in VoiceOver, I'm wondering if the item buttons should be links to the individual items? Give it a go and let me know what you think. When I press a button, it's not immediately obvious that I've navigated to the item, although I can continue navigating with VoiceOver and read the new text. There's an annoying jump in height between an item loading and the linked image loading. Can we show a placeholder for images, or set a default height on that box. |
7357a4e
to
c5d748e
Compare
The new suggested changes feature is neat. |
Yeah. I haven't tried it out for changes that are more than a few characters. Big changes might break things. |
I updated to use an anchor instead and I like it a lot better for the hover state than what I came up with for the button. |
@eatyourgreens Oops! That's fixed in the latest commit. |
I'm also getting |
In addition to the refactor to use Anchor instead of Button for the items list, I've:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to be a pain about naming but I think the API for setting the active item is still confusing. It should be clear whether the model expects to store the selected item, or its array index (whichever is most convenient to pass in from the React component.) The code seems to use both terms interchangeably at the moment. I'm bringing this up because it's been a maintenance problem in PFE where we've used eg. workflow
interchangeably to refer to either a workflow object or a workflow ID. I think the model API should be either setActiveIndex(index)
or setActiveItem(item)
but not setActiveIndex(item)
.
The item links are all showing up as visited links, so they could use unique URLs for the individual items if that's easy to implement.
Testing this out with the keyboard, there's a weird focus problem that might be a Grommet bug. Activate the field guide button from the keyboard. If you press Esc the field guide closes, as expected. Open it again, from the keyboard, and tab to a link. Activate the link with Enter. I'm finding that Esc doesn't do anything from the item page and I have to close the field guide with the mouse. Grommet might be losing the keyboard focus when the guide's content changes.
...mponents/FieldGuide/components/FieldGuide/components/FieldGuideItems/FieldGuideItemAnchor.js
Outdated
Show resolved
Hide resolved
df069c9
to
45d5779
Compare
The focus bug I'll open as a separate issue. It might be a Grommet bug. |
I've pulled down the rebased branch and the item links aren't working any more. I'll have a look to see if I can figure out why. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the last link in the item menu can be clicked. The others don't work.
Co-Authored-By: srallen <[email protected]>
211c0a7
to
dfdb2e9
Compare
Just waiting on Travis. |
Package:
Closes #391.
Describe your changes:
Adds the UI for the field guide
Review Checklist
General
Apps
rm -rf node_modules/ && npm install
and app works as expected?