You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Insert Cannula Slider does not work for languages that go right to left #2105
Describe the bug
A picture is worth a thousand words:
Insert Cannula screen for Hebrew
To Reproduce
Steps to reproduce the behavior:
Build dev branch (after cannula insertion was changed to a slider)
Pair a pod and go to insertion screen
The slider does not work correctly when the language goes from right to left
Expected behavior
Be able to slide the slider from left to right or right to left - not sure what best approach is.
Right now indicator is all the way to the right and a normal attempt to move it fails.
Based on a hint from the user who complained about this, if you touch the indicator near the left side of the circle and move as fast as possible to the right, you can get it to insert, but obviously - this is not the desired behavior.
Repeated for Arabic as well as Hebrew.
LoopKit/LoopWorkspace, commit 67a4b1f
rPi DASH simulator for testing.
reproduced this in a demoapp.
This app is standalone, and mocks the omnipod integration with swiftui and allows you to test this bug out without inserting an actual pod..
In zulipchat, (in addition to recommending that this be fixed in the upstream repository), it was proposed that instead of
.environment(\.layoutDirection, .leftToRight)
the "fix" should use
.flipsForRightToLeftLayoutDirection(true)
I tested that modification as shown in the graphic below.
We do not have translations for either Arabic or Hebrew for the words in the slider - so they show up as English letters written right to left for both those languages. The slider moves correctly from right to left and inserts the cannula (as tested with the rPi DASH simulator).
This is probably not a perfect translation, but you might try plugging in some Hebrew text (below) to verify that it doesn't flip. My sense is that .flipsForRightToLeftLayoutDirection(true) mirror flips the entire container and might not be appropriate for an element that contains text. החלק כדי להכניס צינורית
Activity
marionbarker commentedon Dec 21, 2023
The PR for OmniBLE and OmniKit are added for cross reference.
dabear commentedon Dec 27, 2023
reproduced this in a demoapp.
This app is standalone, and mocks the omnipod integration with swiftui and allows you to test this bug out without inserting an actual pod..
dabear/testslider3@0029e9d
dabear commentedon Dec 27, 2023
reported it upstream here: no-comment/SlideButton#4
marionbarker commentedon Dec 28, 2023
In zulipchat, (in addition to recommending that this be fixed in the upstream repository), it was proposed that instead of
the "fix" should use
I tested that modification as shown in the graphic below.
We do not have translations for either Arabic or Hebrew for the words in the slider - so they show up as English letters written right to left for both those languages. The slider moves correctly from right to left and inserts the cannula (as tested with the rPi DASH simulator).
billybooth commentedon Dec 28, 2023
This is probably not a perfect translation, but you might try plugging in some Hebrew text (below) to verify that it doesn't flip. My sense is that
.flipsForRightToLeftLayoutDirection(true)mirror flips the entire container and might not be appropriate for an element that contains text.החלק כדי להכניס צינוריתmarionbarker commentedon Dec 28, 2023
I added your Hebrew string to the translation by inserting these lines into
LoopWorkspace/OmniBLE/OmniBLE/he.lproj/Localizable.strings:Here is the result:
I agree that this is probably not the correct thing to do.
dabear commentedon Dec 29, 2023
fixed upstream
marionbarker commentedon Dec 29, 2023
This LoopWorkspace PR pulls in the upstream fix.
marionbarker commentedon Jan 4, 2024
This was fixed when LoopKit/LoopWorkspace#103 was merged.