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

Disable buttons for favorite overrides that are incompatible with the current compiler #5748

Merged

Conversation

DavidSpickett
Copy link
Contributor

@DavidSpickett DavidSpickett commented Nov 13, 2023

And include a tooltip to tell the user why the button is disabled.

One example would be:

  • You favourite TableGen's "action" override.
  • You then switch to GCC.
  • GCC doesn't support "action" so the button is shown, but is disabled.
  • If you go back to TableGen, "action" is now enabled again.

@partouf
Copy link
Contributor

partouf commented Nov 14, 2023

I wonder if it wouldn't be better to gray them out instead with some CSS.

@DavidSpickett DavidSpickett changed the title Only show favorite overrides that are compatible with the current compiler Disable buttons for favorite overrides that are incompatible with the current compiler Nov 14, 2023
@DavidSpickett
Copy link
Contributor Author

I've done that by disabling the button instead, that way you can't click on it either. So now you've got a list of all the favourites and the one's that are interactable are the compatible ones.

@DavidSpickett
Copy link
Contributor Author

Given that there is no global display of favourites other than this menu, I agree that hiding them could be confusing in its own way.

… current compiler

And include a tooltip to tell the user why the button is disabled.

One example would be:
* You favourite TableGen's "action" override.
* You then switch to GCC.
* GCC doesn't support "action" so the button is shown, but is disabled.
* If you go back to TableGen, "action" is now enabled again.
@DavidSpickett
Copy link
Contributor Author

I just realised that this only checks the name of overrides not the values (some compilers might have "target", but different values for it). But if you are ok accepting it as is then great, and I will make a follow up that does that and provides a more specific tooltip for those situations.

@partouf
Copy link
Contributor

partouf commented Nov 14, 2023

I just realised that this only checks the name of overrides not the values (some compilers might have "target", but different values for it). But if you are ok accepting it as is then great, and I will make a follow up that does that and provides a more specific tooltip for those situations.

A followup is fine, no rush

@DavidSpickett
Copy link
Contributor Author

A followup is fine, no rush

#5758

@partouf partouf merged commit 17a6aa7 into compiler-explorer:main Nov 29, 2023
8 checks passed
@partouf
Copy link
Contributor

partouf commented Nov 29, 2023

Sorry for the delay, this is now live

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants