Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement UI for automation rules #5996
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
Implement UI for automation rules #5996
Changes from 14 commits
1164ba4
9ee90f8
48e8bc9
511edeb
4347997
2e0831b
9db6f58
4ba11d3
cb72dff
3c4109a
9048368
d9575fe
10bc350
47ec2ca
f7d2c7d
ccc02c3
21fe1f0
e7ca032
ffe2891
eca2d14
09319c8
5640dae
e001105
89ccea3
9c1cbfc
6b5c4b1
5d1aa57
b93ef89
1779d6b
cdd28a3
156b467
576bde5
5d17ab3
4d82191
5a802a9
556f676
28915d2
0dcd88b
abcb822
b206bc0
d41bce7
43c4114
5d6d839
062b3fc
146c816
9d78e74
5ff19bd
ba0ccfb
e8d356f
3c293d6
ce3349a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think it's better to leave it blank if the user does not enter any description and make this check when rendering. This way we are not duplicating the same value over and over in the db and also if we change it later with a better message, it will change for all the users.
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.
But then the user would see the description in list page and not on the form, I think that would be confusing
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.
I'm fine with that.
Although, if you want to show it in the form as well, you can add it in the
Form.__init__
method.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.
We can't do that bc we don't know what option is going to be selected yet
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.
The thing is that you want to populate that field with the default text only when editing the rule. When creating the rule, the field should be empty so the user can write anything they want.
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.
Is empty by default, if the form is saved without a description, the rule is saved with the default description, otherwise use what the user wrote
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.
Right. Why do we want to save the same value over and over again in the database if it's the default when it's
None
? That's my point.