Skip to content

Commit d774a50

Browse files
committed
[gchq#181] set mobile ops-dropdown to fill all space except ops and banner. No need for the controls at this point while scrolling the ops
1 parent a27de41 commit d774a50

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/web/App.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -906,15 +906,15 @@ class App {
906906
const controlsHeight = 50;
907907
const operationsHeight = 80;
908908

909-
const remainingSpace = window.innerHeight - (bannerHeight+controlsHeight+operationsHeight);
909+
const remainingSpace = window.innerHeight - (bannerHeight+controlsHeight+operationsHeight - 1); // - 1 is accounting for a border
910910

911911
// equally divide among recipe, input and output
912912
["recipe", "input", "output"].forEach(( div ) => {
913913
document.getElementById(div).style.height = `${remainingSpace/3}px`;
914914
});
915915

916916
// set the ops-dropdown height
917-
document.getElementById("operations-dropdown").style.maxHeight = `${remainingSpace}px`;
917+
document.getElementById("operations-dropdown").style.maxHeight = `${window.innerHeight - (bannerHeight+operationsHeight)}px`;
918918
}
919919
}
920920

src/web/TODO.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- shannon entropy thingies
88
- maybe a bit annoying that the fav cat opens whenever you add a new fav via icon-fav-click on mobile
99
- backspace on fs view should close max view. Keep making the same mistake and navigating away when for instance recipe is expanded and double click the window to fs > resolve. Reset layout
10+
- remove tabs on window resizing large to small?
11+
- drag and drop from op to rec on desktop only working once
1012

1113
### JS:
1214
- `core/Recipe.mjs`, `core/lib/Magic.js` return imports to original

src/web/stylesheets/components/_controls.css

+1-6
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@
88

99
#controls {
1010
width: 100%;
11+
border-top: 1px solid var(--primary-border-colour);
1112
background-color: var(--secondary-background-colour);
1213
overflow: hidden;
1314
}
1415

15-
@media only screen and (min-width: 768px) {
16-
#controls {
17-
border-top: 1px solid var(--primary-border-colour);
18-
}
19-
}
20-
2116
#controls-content {
2217
display: flex;
2318
padding: 10px 0;

0 commit comments

Comments
 (0)