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

Validate required fields in writeback forms #23387

Merged
merged 4 commits into from Jun 16, 2022

Conversation

kulyk
Copy link
Member

@kulyk kulyk commented Jun 16, 2022

Based on BE work from #23213

Makes FE take the new database_required field metadata flag in mind when building insert/update forms. Required fields are going to have a "(required)" label next to their display names and the form submission will be disabled until all the required fields are filled in.

@kulyk kulyk requested a review from akiselev June 16, 2022 14:58
@kulyk kulyk self-assigned this Jun 16, 2022
@codecov
Copy link

codecov bot commented Jun 16, 2022

Codecov Report

Merging #23387 (05e61d7) into pod-writeback (c9f59ec) will decrease coverage by 0.07%.
The diff coverage is 6.66%.

@@                Coverage Diff                @@
##           pod-writeback   #23387      +/-   ##
=================================================
- Coverage          64.01%   63.94%   -0.08%     
=================================================
  Files               2657     2652       -5     
  Lines              83725    83269     -456     
  Branches           10409    10402       -7     
=================================================
- Hits               53600    53248     -352     
+ Misses             25890    25805      -85     
+ Partials            4235     4216      -19     
Flag Coverage Δ
front-end 44.53% <6.66%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
frontend/src/metabase-lib/lib/metadata/Field.ts 70.83% <ø> (ø)
...rc/metabase/writeback/containers/WritebackForm.tsx 0.00% <0.00%> (ø)
frontend/src/metabase/writeback/utils.ts 40.00% <14.28%> (-2.86%) ⬇️
src/metabase/task/sync_databases.clj 77.08% <0.00%> (-3.48%) ⬇️
src/metabase/driver/sql_jdbc/execute.clj 75.11% <0.00%> (-2.01%) ⬇️
...issions/query_processor/middleware/permissions.clj 88.13% <0.00%> (-1.70%) ⬇️
...c/metabase/driver/sql_jdbc/sync/describe_table.clj 61.16% <0.00%> (-1.51%) ⬇️
src/metabase/models/card.clj 89.50% <0.00%> (-1.36%) ⬇️
src/metabase/api/card.clj 77.91% <0.00%> (-0.76%) ⬇️
...ase/modes/components/drill/DashboardClickDrill.jsx 2.22% <0.00%> (-0.60%) ⬇️
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9f59ec...05e61d7. Read the comment docs.

@kulyk kulyk merged commit e5b8088 into pod-writeback Jun 16, 2022
@kulyk kulyk deleted the fe-writeback-handle-required-fields branch June 16, 2022 15:35
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.

None yet

2 participants