Promote develop to main: the switches survive everything - #873
Merged
Merged
Conversation
Owner, looking at the screen: "i dont see any option to play or save why?" and "why settings in wrong place. is it belongs to coresettings?" Two faults, one of them mine and bad. THE SWITCHES AND THE TEST BUTTON WERE BEING HIDDEN. PosnicPro.i18n is not always ready at DOM ready - this repository has its own test about that - so filling the voice picker threw, and the failure path hid the ROW holding the switches and the Test button while leaving three empty pickers on screen. The worst shape available: the feature looked broken and impossible to turn on at the same time, while the setting underneath was working perfectly. A missing switch is a feature nobody can use; an unfilled picker is one somebody ignores. So nothing can hide the switches now. The pickers fill inside their own try/catch, a setting that will not load shows the switches unchecked rather than removing them, and every string goes through a helper that falls back to the English it was handed - the English is the argument, so it is always available. The one place that may still hide is a browser, where there is no bridge at all, and it hides the whole fieldset rather than one row of it. AND IT WAS ON THE WRONG TAB. It sat in Sale, beside the auto-focus switches, because those are per-device too. Per-device was the wrong thing to group by. The kitchen sound is about the kitchen TICKET, so the person who wants it is the person setting up the kitchen printer - the Print tab, which already carries the note explaining that printers, cash drawers and kitchen hardware belong to this computer rather than to the shop. Nobody configuring the sale screen is looking for a speaker.
Everything else that needs a kitchen ticket says so the moment it is saved: the API is require()d into the till's own process, the sale emits on `process`, and the printer runs within a few hundred milliseconds. The cancel flow wrote its change record and returned one branch too early, so a cancellation was the only ticket left to the poller's thirty second safety net. Nothing was lost, which is why it lasted. From the owner's counter: two cancellations at 18:38:57 and 18:39:01, both printed by the 18:39:24 poll - 23 and 27 seconds of waiting, then 57 ms and 63 ms to print. "when i very first time it took only few seconds to print. then after than it took almot 30 to 60 seconds." It also hid two earlier rounds of work. The cancellation had been barred from the fast byte path, and its struck line cost 1,736 bytes a row whatever the dish; both were fixed, and neither could show while the ticket was found by a timer rather than announced. Gated on a change record existing, because `changes[].items` is what the poller builds a cancellation ticket out of: a cancellation with nothing printable must not wake the printer. The test that covered this counted notifyKotReady calls in the whole twelve thousand line file and matched its reason strings anywhere in it, so five sites in other methods kept it green while the cancel flow had none. Each flow is now checked inside its own stretch of the method, and a new test cancels a real order against a real mongod and listens.
The switches survive everything, and they live with printing
…nobody A cancelled ticket waits for nobody
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits.
mainneeds them before the next exe, because until then the settings block on a shop's screen is the broken one.Carries
The switches survive everything, and they live with printing (#871).
A shop's screen showed the legend, the help text and three empty pickers, with no switches and no Test button. All the markup was in the page; the JavaScript was removing it.
PosnicPro.i18nis not always ready at DOM ready, so filling the voice picker threw, and the failure path hid the row holding the switches and the Test button while leaving the pickers behind. The feature looked broken and impossible to turn on at the same time, while the setting underneath worked perfectly.Now nothing can hide the switches: they are set before anything that can fail, the pickers fill in their own try/catch, a setting that will not load shows them unchecked rather than removing them, and every string falls back to the English it was handed. The only remaining hide is the no-bridge browser case, and it hides the whole fieldset rather than one row.
It also moves from the Sale tab to the Print tab. It had been grouped with the auto-focus switches because those are per-device too, and per-device was the wrong thing to group by: the kitchen sound is about the kitchen ticket, so the person who wants it is the person setting up the kitchen printer.
Four tests, including one that asserts exactly one
block().hide()exists and that it lives in the no-bridge branch.Note
The audio itself already works on the machine being tested; it was off only because nobody had switched it on. This is the fix for being able to switch it on from the screen.
Do not squash.