fix(studio): styles & placement for MoreMenu fixes P-178

See https://linear.app/theatre/issue/P-178/bug-broken-updater-ui-in-simple-html-page
This commit is contained in:
Cole Lawrence 2022-07-23 07:47:19 -04:00
parent fcc23b3863
commit 01729bf45e
2 changed files with 15 additions and 0 deletions

View file

@ -105,6 +105,14 @@ const GlobalToolbar: React.FC = () => {
constraints: { constraints: {
maxX: triggerBounds.right, maxX: triggerBounds.right,
maxY: 8, maxY: 8,
// MVP: Don't render the more menu all the way to the left
// when it doesn't fit on the screen height
// See https://linear.app/theatre/issue/P-178/bug-broken-updater-ui-in-simple-html-page
// 1/10 There's a better way to solve this.
// 1/10 Perhaps consider separate constraint like "rightSideMinX" & for future: "bottomSideMinY"
// 2/10 Or, consider constraints being a function of the dimensions of the box => constraints.
minX: triggerBounds.left - 140,
minY: 8,
}, },
verticalGap: 2, verticalGap: 2,
} }

View file

@ -22,6 +22,13 @@ const Container = styled.div`
@supports not (backdrop-filter: blur()) { @supports not (backdrop-filter: blur()) {
background-color: rgba(42, 45, 50, 0.98); background-color: rgba(42, 45, 50, 0.98);
} }
color: rgba(255, 255, 255, 0.9);
& a {
// Fix colors of links to not be default
color: inherit;
}
` `
const Item = styled.div` const Item = styled.div`