-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add button to quickly include all form variables in JSON dump plugin #5070
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5070 +/- ##
=======================================
Coverage 96.74% 96.74%
=======================================
Files 771 771
Lines 26636 26636
Branches 3467 3467
=======================================
Hits 25770 25770
Misses 605 605
Partials 261 261 ☔ View full report in Codecov by Sentry. |
b11b609
to
1013703
Compare
820f230
to
62bc105
Compare
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 thinking now this might be better placed in Backend -> Admin styling?
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.
No this would be the correct place. (S)CSS is frontend stuff :)
I would suggest moving this to a separate file, instead of added it to the index.rst, just to give some structure.
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 was a bit confused by the definition of frontend here. If you look at the frontend documentation, it only mentions the repos related to the form frontend, not the admin styling. I guess it depends on what is meant exactly by Backend and Frontend here:
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.
Some small comments/things to keep in mind :)
src/openforms/js/components/admin/form_design/registrations/json_dump/fields/Variables.js
Outdated
Show resolved
Hide resolved
|
||
<button | ||
type="button" | ||
className="button button--padded" |
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.
.button--padded
currently does nothing, as its not defined in any .scss file. I think it would be nice to add some padding to this button.
As i see it, you have two options:
- You could add
.button--padded
to the_button.scss
file (using@include bem.modifier('padded')
) and define the padding there (in this case, keep the padding inline with the other buttons) - Or you could use the
<ActionButton />
component (which is already styled like you would 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.
I had indeed seen the <ActionButton />
, but it uses an <input />
component rather than a <button />
. Wouldn't this mean that it acts like a 'Save' button of the modal?
EDIT: I guess we can override the type property with type="button"
src/openforms/js/components/admin/form_design/registrations/json_dump/fields/Variables.js
Outdated
Show resolved
Hide resolved
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.
No this would be the correct place. (S)CSS is frontend stuff :)
I would suggest moving this to a separate file, instead of added it to the index.rst, just to give some structure.
docs/developers/frontend/index.rst
Outdated
.json-dump-variables { | ||
display: flex; | ||
|
||
&--horizontal { |
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.
If we are gonna add documentation for styling, we might as well convince the reader to use @include bem.
stuff :)
&--horizontal { | |
@include bem.modifier('horizontal') { |
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 there an advantage of using @include bem.modifier
?
00d1a2d
to
0ad3397
Compare
Added a (short) section on how to add custom styling of admin components.
0ad3397
to
3819dac
Compare
Closes #5066
Changes
Add button to quickly include all form variables in JSON dump plugin
Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Dockerfile/scripts
./bin
folderCommit hygiene