[#181] disable tooltips on mobile UI

This commit is contained in:
Robin Scholtes 2023-05-02 20:42:57 +12:00
parent 7fff6f51dc
commit 8bed81c5ee
5 changed files with 15 additions and 37 deletions

View file

@ -59,11 +59,10 @@ class App {
setup() { setup() {
document.dispatchEvent(this.manager.appstart); document.dispatchEvent(this.manager.appstart);
this.initialiseSplitter(); this.initialiseUI();
this.setCompileMessage(); this.setCompileMessage();
this.loadLocalStorage(); this.loadLocalStorage();
this.populateOperationsList(); this.populateOperationsList();
this.manager.recipe.updateSelectedOperations();
this.manager.setup(); this.manager.setup();
this.manager.output.saveBombe(); this.manager.output.saveBombe();
this.uriParams = this.getURIParams(); this.uriParams = this.getURIParams();
@ -298,11 +297,11 @@ class App {
* *
* @param {boolean} [minimise=false] - Set this flag if attempting to minimise frames to 0 width * @param {boolean} [minimise=false] - Set this flag if attempting to minimise frames to 0 width
*/ */
initialiseSplitter(minimise=false) { initialiseUI() {
if ( window.innerWidth < this.breakpoint ){ if ( window.innerWidth < this.breakpoint ){
this.setMobileLayout(); this.setMobileUI();
} else { } else {
this.setDesktopLayout(minimise); this.setDesktopUI(false);
} }
} }
@ -346,7 +345,7 @@ class App {
}); });
this.ioSplitter = Split(["#input", "#output"], { this.ioSplitter = Split(["#input", "#output"], {
sizes: [40,60], sizes: [45,55],
direction: "vertical", direction: "vertical",
gutterSize: 0, gutterSize: 0,
}); });
@ -879,6 +878,8 @@ class App {
* @param {boolean} minimise * @param {boolean} minimise
*/ */
setDesktopUI(minimise){ setDesktopUI(minimise){
// enable tooltips on desktop as normal
$("[data-toggle=tooltip]").tooltip("enable");
this.setDesktopLayout(minimise); this.setDesktopLayout(minimise);
// repopulate to enable popovers and drag events // repopulate to enable popovers and drag events
this.populateOperationsList(); this.populateOperationsList();
@ -890,6 +891,8 @@ class App {
} }
setMobileUI(){ setMobileUI(){
// tooltips on mobile are reducing UX, so we disable it
$("[data-toggle=tooltip]").tooltip("disable");
this.setMobileLayout(); this.setMobileLayout();
// repopulate to disable popovers and drag events // repopulate to disable popovers and drag events
this.populateOperationsList(); this.populateOperationsList();

View file

@ -9,6 +9,7 @@
- view-heights not correct due to variable taskbar on mobile devices - view-heights not correct due to variable taskbar on mobile devices
- need long press checks on mobile to add favourites and switch ingredient order - need long press checks on mobile to add favourites and switch ingredient order
- raw bites dropdown thingy is unusable
### Desktop UI: ### Desktop UI:
### General UI: ### General UI:

View file

@ -33,9 +33,9 @@
bottom: 0; bottom: 0;
} }
/*#IO {*/ #IO {
/* padding-bottom: var(--controls-height);*/ padding-bottom: var(--controls-height);
/*}*/ }
#recipe.maximised-pane, #recipe.maximised-pane,
#input.maximised-pane, #input.maximised-pane,

View file

@ -2,7 +2,8 @@
--banner-height: 40px; --banner-height: 40px;
--controls-height: 70px; --controls-height: 70px;
--workspace-height: calc( 100vh - var(--banner-height) - var(--controls-height)); --workspace-height: calc( 100vh - var(--banner-height) - var(--controls-height));
--recipe-height: 38vh; --recipe-height: 22vh;
--operations-height: 89px; --operations-height: 89px;
/* io gets the remaining space */
--io-height: calc(100vh - var(--banner-height) - var(--controls-height) - var(--recipe-height) - var(--operations-height)); --io-height: calc(100vh - var(--banner-height) - var(--controls-height) - var(--recipe-height) - var(--operations-height));
} }

View file

@ -1400,33 +1400,6 @@ class OutputWaiter {
switchButton.firstElementChild.innerHTML = "open_in_browser"; switchButton.firstElementChild.innerHTML = "open_in_browser";
} }
/**
* Handler for maximise output click events.
* Resizes the output frame to be as large as possible, or restores it to its original size.
*/
// maximiseOutputClick(e) {
// const el = e.target.id === "maximise-output" ? e.target : e.target.parentNode;
//
// if (el.getAttribute("data-original-title").indexOf("Maximise") === 0) {
// document.body.classList.add("output-maximised");
// this.app.initialiseSplitter(true);
// this.app.columnSplitter.collapse(0);
// this.app.columnSplitter.collapse(1);
// this.app.ioSplitter.collapse(0);
//
// $(el).attr("data-original-title", "Restore output pane");
// el.querySelector("i").innerHTML = "fullscreen_exit";
// } else {
// document.body.classList.remove("output-maximised");
// $(el).attr("data-original-title", "Maximise output pane");
// el.querySelector("i").innerHTML = "fullscreen";
// this.app.initialiseSplitter(false);
// // if ( window.innerWidth >= this.app.breakpoint ){
// // this.app.resetLayout();
// // }
// }
// }
/** /**
* Handler for find tab button clicked * Handler for find tab button clicked