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

Graph button hidden if no graph. #2377 #2419

Merged
merged 7 commits into from
Nov 18, 2024
Merged

Graph button hidden if no graph. #2377 #2419

merged 7 commits into from
Nov 18, 2024

Conversation

knirirr
Copy link
Contributor

@knirirr knirirr commented Oct 18, 2024

This PR hides the graph button and disables the menu entry if there is no graph to see, according to #2377.
To prove this, compare most records (e.g. 1547) with 123, from which I have deleted the graph.

The PR for the server-side change is here: https://github.com/FAIRsharing/FAIRsharing-API/pull/1083

@knirirr knirirr linked an issue Oct 18, 2024 that may be closed by this pull request
Copy link
Contributor

@allysonlister allysonlister left a comment

Choose a reason for hiding this comment

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

I like the greyed-out "View relation graph" in the actions menu.

While this is functioning as I would expect, I am also thinking ahead to the report generation, where we are likely to have a button that is greyed out when the functionality is unavailable (e.g. "Log in to download report").

Bearing this in mind, would it be better to have the behaviour when there is no graph as follows?

  1. for the action menu: continue to grey it out as written here, but also change the text to "No graph available"
  2. for the button in the Gen Info card: change colour to pale grey and change text to "No graph available".
  3. Add a "?" next to the button in Gen Info that is there whatever the state of the graph that says: "Generate relation graphs are available for all records unless there are no relations or the graph has not yet been generated."

What do you think? We would need the greyed-out non-clickable button in item 2 so that the "?" isn't hovering on its own when there isn't a graph.

Happy to hear contrary views here.

@knirirr
Copy link
Contributor Author

knirirr commented Oct 21, 2024

I have no opinion either way, and so would be happy to make those changes (assuming I can...).

@allysonlister
Copy link
Contributor

allysonlister commented Oct 21, 2024

Thanks - please would you go ahead with my suggestions then.

@knirirr knirirr requested a review from allysonlister October 21, 2024 15:24
Copy link
Contributor

@allysonlister allysonlister left a comment

Choose a reason for hiding this comment

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

thank you looks great!

@knirirr knirirr merged commit 8ee3bfa into dev Nov 18, 2024
5 checks passed
@knirirr knirirr deleted the hide_graph_button_2377 branch November 18, 2024 10:54
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.

Hide graph button
3 participants