diff --git a/app/src/App.css b/app/src/App.css index ddc10ad3..d0f46346 100644 --- a/app/src/App.css +++ b/app/src/App.css @@ -266,6 +266,10 @@ pre.wrap-text { flex-wrap: wrap; align-items: center; gap: 0.5em; + /* Fill the actions row: `.wrolpi-modal-actions` packs its children to the right, which + is where a confirming button belongs but strands this toolbar. At full width the + toolbar's own layout wins and everything reads from the left. */ + flex: 1 1 100%; } .preview-toolbar-group { @@ -281,6 +285,14 @@ pre.wrap-text { min-width: 0; } +/* On a phone the tags selector always gets its own line rather than squeezing in beside + the buttons. 700px is the app's `tablet` breakpoint (`AppMedia` in contexts.js). */ +@media (max-width: 699px) { + .preview-toolbar-tags { + flex-basis: 100%; + } +} + /* Caps preview content to fit inside the file-preview Modal. 300px reserves room for pathContent
, Modal.Header, Modal.Actions row,
    inner content (e.g. STL dimensions banner), and modal padding.
diff --git a/app/src/Tags.js b/app/src/Tags.js
index 5ebc6d1f..107d7316 100644
--- a/app/src/Tags.js
+++ b/app/src/Tags.js
@@ -583,7 +583,9 @@ export function AddTagsButton({
          handleClose(e)}
@@ -567,6 +567,7 @@ export function FilePreviewProvider({children}) {
             
                 
+ {openButton} {downloadButton} {directoryButton} @@ -576,9 +577,6 @@ export function FilePreviewProvider({children}) { title='Add to Playlist'/>}
{tagsDisplay}
-
- {openButton} -
{content} diff --git a/app/src/components/Nav.js b/app/src/components/Nav.js index a74cf7fd..8b3c1117 100644 --- a/app/src/components/Nav.js +++ b/app/src/components/Nav.js @@ -432,7 +432,7 @@ export function NavBar() { {driveHealthIcon} {powerIcon} {warningIcon} - + ; diff --git a/app/src/components/Share.js b/app/src/components/Share.js index cf31c14d..f04bf21f 100644 --- a/app/src/components/Share.js +++ b/app/src/components/Share.js @@ -1,5 +1,5 @@ import React from "react"; -import {Button, Header, Icon, Modal} from "./ui"; +import {Button, Header, Icon, IconButton, Modal} from "./ui"; import QRCode from "react-qr-code"; import {sendNotification} from "../api"; @@ -20,7 +20,11 @@ export const ShareEveryoneButton = ({url, size, onClick}) => { } -export const ShareButton = () => { +/* + * `asIcon` is for the navbar corner, where the trigger sits beside other bare glyphs and a + * boxed button would not match; everywhere else it is a real button, matching its siblings. + */ +export const ShareButton = ({asIcon = false}) => { const [open, setOpen] = React.useState(false); const handleOpen = (e) => { @@ -56,8 +60,10 @@ export const ShareButton = () => { - - - + {asIcon + ? + + + : } } diff --git a/app/src/components/ui/ui-layout.cy.js b/app/src/components/ui/ui-layout.cy.js index 616668a0..4020ded4 100644 --- a/app/src/components/ui/ui-layout.cy.js +++ b/app/src/components/ui/ui-layout.cy.js @@ -3941,7 +3941,7 @@ describe('the icon-only triggers in the navbar corner are reachable', () => { * classes I expected the components to have, so reverting SearchIconButton to the old * `item` left it green -- it was measuring my markup, not the app's. */ - const corner = ; + const corner = ; const triggers = { share: '.wrolpi-navbar-icon a',