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

Rule editor UI #94

Merged
merged 26 commits into from
Aug 31, 2023
Merged

Rule editor UI #94

merged 26 commits into from
Aug 31, 2023

Conversation

RazinShaikh
Copy link
Collaborator

Closes #83

@RazinShaikh RazinShaikh marked this pull request as ready for review August 31, 2023 12:30
@jvdwetering
Copy link
Collaborator

Looks good! Something that's a little confusing: When you have the rule editor open, you can still save a graph. But I think what this does is just save the currently selected graph. I would have expected this to save the whole rule as a lemma to a file. Currently all the rules are stored in a single file, but if we want users to be able to share lemmas between each other, we probably want each rule to be in a separate file. So maybe instead of havingcustomrules.json, there could be a designated folder which holds all the lemmas?
So maybe we want some logic to determine what the type of thing is that we are saving, a graph or a rule.
Anyway, this is all not so important for this PR.

@jvdwetering
Copy link
Collaborator

If you click on 'Save rule' while the diagram is not well-formed, for instance if it has a boundary node not connected to anything, then it throws an exception instead of telling the user the diagram is not well-formed.
It also allows you to save rules which are not well-typed, that have for instance a different amount of boundaries on the LHS then on the RHS. If you do this and match the LHS, it simply doesn't match which is weird behaviour. It probably would be best to just pop up a message saying that the rule is not well-typed.

@jvdwetering
Copy link
Collaborator

Also maybe something not for this PR: Have a button that allows the user to switch the LHS and RHS. Or maybe something that allows you to automatically create the reverse rule?

@RazinShaikh
Copy link
Collaborator Author

Also maybe something not for this PR: Have a button that allows the user to switch the LHS and RHS. Or maybe something that allows you to automatically create the reverse rule?

@boldar99 is working on the side panel for rewrite rules (#71). We can have a button there to apply the rewrite rule in the forward or backward direction.

@RazinShaikh
Copy link
Collaborator Author

@jvdwetering the rules are now saved to individual files and the save button in the file menu has the right behavior. I have also added a function to check the rule and warn the user.

@jvdwetering jvdwetering merged commit 60225bd into master Aug 31, 2023
@RazinShaikh RazinShaikh deleted the rule-editor-ui branch August 31, 2023 17:06
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.

UI for creating custom rewrites
2 participants