diff --git a/CHANGELOG.md b/CHANGELOG.md index 43ac60c6..e730a4e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,7 @@ Lines marked **Upgrade step** need you to act after updating. - The form list loads faster when a team has many forms. It now needs the same few database queries for one form or a hundred. Before, every form added 3 queries. (#256) - On screens narrower than 1280 px, a form's editor bar now sits in two rows under the app header: the form with Dashboard and Preview, then Editor, Settings, Integrations and Submissions as tabs. Nothing in it scrolls sideways any more, and the header keeps the logo and your team name. On every screen, keyboard focus in the editor bar and the account menu now shows a blue ring. (#257) - A form's pages have one top bar instead of two: the form's name with its menu, a Draft or Live label, the pages, Preview, Publish and your account. Publish first checks for questions without text, rules that point to a deleted question and a missing privacy link. Once the form is live, Share has its link, Open form and Unpublish. On a phone the pages sit in a tab bar at the bottom. (#265) -- The form editor shows your whole form as one column. Each question shows its number, answer type, text, and if it is required, has rules or is hidden. The question you work on opens right there, also on a phone, where you couldn't edit questions before. Hiding a question, random order and custom answers are now under the question's Settings. (#268) +- The form editor shows your whole form as one column. Each question shows its number, answer type, text, and if it is required, has rules or is hidden. The question you work on opens right there, also on a phone, where you couldn't edit questions before. Hiding a question, random order and custom answers are now under the question's Settings. An outline next to the form jumps to any question, and on a phone a question's Settings open from the bottom of the screen. (#268, #272) - Deleting a question, a group, an answer choice, a consent policy or a logic rule in the form editor now asks first in the app's own dialog. It names the question, how many answers will be deleted with it, and the questions whose rules will stop working. A choice nobody picked, or a policy nobody agreed to, is still deleted at once. (#269) ### Fixed diff --git a/resources/css/_touch-fields.css b/resources/css/_touch-fields.css new file mode 100644 index 00000000..360e2527 --- /dev/null +++ b/resources/css/_touch-fields.css @@ -0,0 +1,33 @@ +/* The form editor's question card below lg: every field 44 px tall with + 16 px text (iOS zooms into a focused field under 16 px), and a 44 px tap + area on switches and checkboxes. One rule here instead of a class on + every D9 field in the Configure* parts. */ +@media (max-width: 1023px) { + .touch-fields + :is( + input:not([type="checkbox"], [type="radio"]), + textarea, + button[aria-haspopup="listbox"] + ) { + min-height: 2.75rem; + font-size: 1rem; + } + + .touch-fields [role="option"] { + padding-block: 0.625rem; + } + + /* D9Switch is relative and 24 px tall */ + .touch-fields [role="switch"]::before { + content: ""; + position: absolute; + inset: -10px 0; + } + + /* D9Checkbox: its label covers the whole 20 px row, stretched to 44 px */ + .touch-fields input[type="checkbox"] + div > label::before { + content: ""; + position: absolute; + inset: -12px 0; + } +} diff --git a/resources/css/app.css b/resources/css/app.css index b2e81f72..4cb71eee 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -12,6 +12,7 @@ @import "./_tooltip.css"; @import "./_typography.css"; @import "./_tiptap.css"; +@import "./_touch-fields.css"; @import "tailwindcss/utilities"; diff --git a/resources/js/Layouts/AppLayout.vue b/resources/js/Layouts/AppLayout.vue index c8e59193..fe52d00f 100644 --- a/resources/js/Layouts/AppLayout.vue +++ b/resources/js/Layouts/AppLayout.vue @@ -4,7 +4,9 @@ -
+
diff --git a/resources/js/components/Factory/Document/BlockMenu.vue b/resources/js/components/Factory/Document/BlockMenu.vue index 6c351edb..6bfb93ec 100644 --- a/resources/js/components/Factory/Document/BlockMenu.vue +++ b/resources/js/components/Factory/Document/BlockMenu.vue @@ -6,7 +6,7 @@ >