HackerNewsCorpus and LdaMallet model

I added a class for tokenizing comments of the HackerNews dataset and a LDA model that is based on Java MALLET.
The found 10 topics in the comments of HN_2017-07 represented by their top 20 words are:
# 0	5	don data service doesn problem security system access bitcoin case network internet information phone account gt services key number
# 1	5	google web open app source windows don facebook content pretty support game apple users apps site page free works
# 2	5	code language pre data type write run system python languages js performance programming function memory simple java tools api
# 3	5	https href rel nofollow www http org news github en wiki wikipedia amp html id ycombinator item blog youtube
# 4	5	people don person world social law government women fact china bad society country state evidence opinion legal political situation
# 5	5	quot gt don point doesn read understand article isn question true comment wrong make sense thing idea answer makes
# 6	5	problem power space human change long point world system ai high large energy scale current speed problems isn low
# 7	5	work company good software time working experience job product full tech make great team people jobs companies business end
# 8	5	time don ve years things people good day back thing didn lot ll long bad feel days life ago
# 9	5	money pay market cost people year buy car price high big live companies costs business worth cars area make

 # <1000> LL/token: -8.76975 (took 12 minutes)

Note how topic 2 is about programming, 3 represents parts of links, 4 is about social and political stuff, 7 is about problems and 9 about businesses and money.

@mockingbird2 How about now?
My initial plan was to use MALLET as LDA backend and visualize the topics using pyLDAvis so we can easier interpret the topics. The expected output was something like this. However, it turns out that when converting the MALLET model back to a gensim LDA model, the learned topics aren't copied meaning the model needs to be trained again ... I'd still like to merge this branch into the master as it adds a working topic modeling approach and a nice corpus wrapper.

Are you using python2? When I try to run the topic modelling notebook I get encoding errors?

@WGierke Have you tried this gensim lda?


Incorrect playback state for livestream without DVR when the playback interrupted by the system

From the Letterbox specification, a livestream without DVR window can't be in the pause state. It can only have play and idle playback state.
The user must always in the live condition, as there is no seek bar or seek buttons.
Issue type
Incorrect behavior
Description of the problem
When the playback is interrupted by the system, like a alarm, or an other application takes the audio session, the controller goes in the pause state, even if it's a SRGMediaPlayerStreamTypeLive content.
Environment information

Library version: 1.15
iOS version: Any
Device: Any

Reproducibility
Always reproducible
Steps to reproduce
More easy to see on an iPad with a video livestream, but this not only on this device and this kind of media.

Open Letterbox Demo in split view with an other music / video app in the other side. (Like a Play SRG app or an other Letterbox demo app).
Play a "live only" video on Letterbox Demo. The player has only "Play" and "Stop" buttons (no "Pause" button. ie: MMF Topics / bipbop RTSInfo Tagesschau24 / Tagesschau24 (ARD, live only)
On the other app, start an audio or a video.

Letterbox Demo player stops the playback but don't stops de AVPlayer. The frame is in pause and when tapping on the Play button, it resumes it. The stream isn't in live condition anymore.

See feature/playback-interruption.

Merged into develop.


Error - Wakeword install

Hello -
I'm continually hitting this error at the Wakeword install step, see screenshot.
ERROR: Could not find a version that satisfies the requirement tflite-runtime-nightly (from versions: none)
ERROR: No matching distribution found for tflite-runtime-nightly

Thanks in advance for any advice!

I ran into this. what worked for me was I ran and apt-get update, rebooted, then  run python or python3 -m installer. make simple changes and apply it. then try and run the script/setup again. I believe this is what got me working. I had a lot of trial an error but this might work for you as well. Hopefully it will.

Try following the instructions again but in the beginning, instead of flashing "Legacy" Raspberry Pi OS, select the same variant but the normal, latest non-legacy one. So something like "Raspberry Pi OS 64-bit Lite".

Did starting over and using a different OS solve the problem?  I'm running into it as well...

Did starting over and using a different OS solve the problem? I'm running into it as well...

It did for me. I having a Pi Zero 2W with a 2-Mic hat and everything works fine under non-legacy Pi OS.

Which version did you use?  If I may ask...

Which version did you use? If I may ask...

Thanks for that.  Not sure what's going on - my attempts always causes the Pi to lockup when it's trying to create the drivers :-/

Thanks for that. Not sure what's going on - my attempts always causes the Pi to lockup when it's trying to create the drivers :-/

What Pi model is it?

Raspberry Pi Zero 2 W

@tannisroot, thank you, I tried the non-legacy version and it locks up as @tsx-5 describes. I'm using Pi Zero 2W

This is so weird. How can I have the exact same hardware and not have this issue under the exact same OS?

This is so weird. How can have the exact same hardware and not have this issue under the exact same OS?

Yeah, agreed! Really odd.
I found this and I was able to complete the install:
https://github.com/rhasspy/wyoming-satellite/issues/157#issuecomment-2067548218

I should also mention - I went back to the legacy RPi install and I do have wake word working, but no LED yet.

Thanks for that. Not sure what's going on - my attempts always causes the Pi to lockup when it's trying to create the drivers :-/

What Pi model is it?

When you say creating drivers, do you mean when it compiles? Or when it tries to install them after compilation?
It's possible for whatever reason that the Pi is consuming more power during compile under bookworm, and due to a bad power supply it locks up.

I got the same problem, used the legacy rpiOS and were not able to install the wakeword. Follow the hin to retry it using the "non legacy" lite version but then stuck during the driver compilation an
Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.6.20+rpt-rpi-v8 -C /lib/modules/6.6.20+rpt-rpi-v8/build M=/var/lib/dkms/seeed-voicecard/0.3/build..

After running htop in parallel the zero got stuck when the swap was used about 99%.
Increasing the swap to 512mb following this guide  solved it for me.

Thanks holgerb,
Increasing the swap allowed for everything to compile and move forward.  That said, wakeword still seems to have an issue...

● wyoming-openwakeword.service - Wyoming openWakeWord
     Loaded: loaded (/etc/systemd/system/wyoming-openwakeword.service; disabled; preset: enabled)
     Active: active (running) since Fri 2024-06-07 18:16:37 EDT; 1min 11s ago
   Main PID: 883 (python3)
      Tasks: 9 (limit: 174)
        CPU: 5.604s
     CGroup: /system.slice/wyoming-openwakeword.service
             ├─883 python3 /home/bat-sat/wyoming-openwakeword/script/run --uri tcp://<IP_ADDRESS>:10400
             └─884 /home/bat-sat/wyoming-openwakeword/.venv/bin/python3 -m wyoming_openwakeword --uri tcp://<IP_ADDRESS>:10400

Jun 07 18:16:37 bat-sat systemd[1]: Started wyoming-openwakeword.service - Wyoming openWakeWord.
Jun 07 18:16:39 bat-sat run[884]: INFO:root:Ready
Jun 07 18:17:40 bat-sat run[884]: INFO: Created TensorFlow Lite XNNPACK delegate for CPU.

I'll highlight the disabled part of that (the icon shows green - even though it reports disabled).  Anyone else seeing this?

Thanks holgerb,
Increasing the swap allowed for everything to compile and move forward. That said, wakeword still seems to have an issue...

● wyoming-openwakeword.service - Wyoming openWakeWord
     Loaded: loaded (/etc/systemd/system/wyoming-openwakeword.service; disabled; preset: enabled)
     Active: active (running) since Fri 2024-06-07 18:16:37 EDT; 1min 11s ago
   Main PID: 883 (python3)
      Tasks: 9 (limit: 174)
        CPU: 5.604s
     CGroup: /system.slice/wyoming-openwakeword.service
             ├─883 python3 /home/bat-sat/wyoming-openwakeword/script/run --uri tcp://<IP_ADDRESS>:10400
             └─884 /home/bat-sat/wyoming-openwakeword/.venv/bin/python3 -m wyoming_openwakeword --uri tcp://<IP_ADDRESS>:10400

Jun 07 18:16:37 bat-sat systemd[1]: Started wyoming-openwakeword.service - Wyoming openWakeWord.
Jun 07 18:16:39 bat-sat run[884]: INFO:root:Ready
Jun 07 18:17:40 bat-sat run[884]: INFO: Created TensorFlow Lite XNNPACK delegate for CPU.

I'll highlight the disabled part of that (the icon shows green - even though it reports disabled). Anyone else seeing this?
More info...
bat-sat@bat-sat:~/wyoming-openwakeword/script $ ./run --uri 'tcp://<IP_ADDRESS>:10400'
/home/bat-sat/wyoming-openwakeword/.venv/bin/python3: No module named wyoming_openwakeword
Traceback (most recent call last):
  File "/home/bat-sat/wyoming-openwakeword/script/./run", line 12, in <module>
    subprocess.check_call([context.env_exe, "-m", "wyoming_openwakeword"] + sys.argv[1:])
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/bat-sat/wyoming-openwakeword/.venv/bin/python3', '-m', 'wyoming_openwakeword', '--uri', 'tcp://<IP_ADDRESS>:10400']' returned non-zero exit status 1.

running setup completes without any errors, but it seems I'm missing a module.

You didn't specify the wakeword to load

It's also not how you test run the the service, you need to use script/run and not ./run.

Hey tannisroot,
Thanks for replying, I ran that command in the script folder (sorry to not have noted that).  I also tried it with the wakeword command, without any success.  I did look at the video doing these steps and noted that "disabled" was on his output for openwakeword - so even further from knowing what the issue is.

Hey tannisroot,
Thanks for replying, I ran that command in the script folder (sorry to not have noted that). I also tried it with the wakeword command, without any success. I did look at the video doing these steps and noted that "disabled" was on his output for openwakeword - so even further from knowing what the issue is.

It's unlikely it's related to this issue in particular, but I would bad glad to help further on Discord. Ping me on Home Assistant server, my nickname is the same as here.

For people who are running into driver installation issues, could you please try following the instructions from docs, but instead of installing the mainline wyoming-satellite repo, which corresponds with the following command
git clone https://github.com/rhasspy/wyoming-satellite.git

you install my branch with some changes that should solve the issue?
git clone -b adjust_compile_threads https://github.com/tannisroot/wyoming-satellite.git

Please let me know how it goes and whether the drivers gets successfully installed or not.

For people who are running into driver installation issues, could you please try following the instructions from docs, but instead of installing the mainline wyoming-satellite repo, which corresponds with the following command
git clone https://github.com/rhasspy/wyoming-satellite.git

you install my branch with some changes that should solve the issue?
git clone -b adjust_compile_threads https://github.com/tannisroot/wyoming-satellite.git

Please let me know how it goes and whether the drivers gets successfully installed or not.

This has worked for me. I installed it on a Raspberry Pi Zero 2 W with ReSpeaker 2Mic HAT on the non-legacy Pi OS Lite.
I got no driver errors, and everything seems to be working correctly.
Thank you!

For people who are running into driver installation issues, could you please try following the instructions from docs, but instead of installing the mainline wyoming-satellite repo, which corresponds with the following command
git clone https://github.com/rhasspy/wyoming-satellite.git

you install my branch with some changes that should solve the issue?
git clone -b adjust_compile_threads https://github.com/tannisroot/wyoming-satellite.git

Please let me know how it goes and whether the drivers gets successfully installed or not.

This has worked for me. I installed it on a Raspberry Pi Zero 2 W with ReSpeaker 2Mic HAT on the non-legacy Pi OS Lite.
I got no driver errors, and everything seems to be working correctly.
Thank you!

Thank you so much for testing!

Thanks a lot for this, I now swap the SD card from my Zero 2W to a Pi 3B when it's kernel update time.

Hi @tannisroot , thank you for helping! I have tested your branch with a raspberry pi zero 2 W and the LEgacy 64 Bit lite: No success. Same error as the others in the thread on installing Open Wake Word. What I'm not sure if others tried or not, the other wakeword systems installed and worked just fine.
Then I tested the 64 bit lite (non-legacy): Openwakeword installation worked! However, I am still struggling to get it to work. it is a USB conference speaker, not the respeaker 2mic hat, if that matters.
Weirdly enough, when running the local wake word detection with openwakeword it just never captures anything (despite successful install), while snowboy works.
Again, I appreciate the help so far! :)

Hi @tannisroot , thank you for helping! I have tested your branch with a raspberry pi zero 2 W and the LEgacy 64 Bit lite: No success. Same error as the others in the thread on installing Open Wake Word. What I'm not sure if others tried or not, the other wakeword systems installed and worked just fine. Then I tested the 64 bit lite (non-legacy): Openwakeword installation worked! However, I am still struggling to get it to work. it is a USB conference speaker, not the respeaker 2mic hat, if that matters. Weirdly enough, when running the local wake word detection with openwakeword it just never captures anything (despite successful install), while snowboy works.
Again, I appreciate the help so far! :)

That's good, although my fix is aimed at fixing installation of drivers specifically for respeaker hat, if you have a USB conference speaker, you can use just the non-Legacy Raspberry Pi OS with the master branch.

I tried the tannisroot wyoming installer on my pi zero 2W with Raspberry Pi OS Bookworm Lite 64-bit, but still get no sound from respeaker card. I have not gotten any respeaker or waveshare wm8960 sound cards to work on Pi Zero, but waveshare cards work on Pi4/P5 just fine. Any ideas?
pi@pi0:~ $ sudo systemctl status seeed-voicecard.service
● seeed-voicecard.service - Seeed Voicecard service
Loaded: loaded (/lib/systemd/system/seeed-voicecard.service; enabled; preset: enabled)
Active: active (exited) since Tue 2024-07-09 11:49:48 CDT; 2min 55s ago
Process: 1145 ExecStart=/usr/bin/seeed-voicecard (code=exited, status=0/SUCCESS)
Main PID: 1145 (code=exited, status=0/SUCCESS)
CPU: 505ms
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: No state is present for card vc4hdmi
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: Found hardware: "vc4-hdmi" "" "" "" ""
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: Hardware is initialized using a generic method
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: No state is present for card vc4hdmi
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Jul 09 11:49:48 pi0 seeed-voicecard[1185]: + aplay -l
Jul 09 11:49:48 pi0 seeed-voicecard[1186]: + grep -q 'bcm2835 ALSA'
Jul 09 11:49:48 pi0 systemd[1]: Finished seeed-voicecard.service - Seeed Voicecard service.

I was able to get sound from soundcard when I hooked up a speaker to jst connector. I have been using a speaker attached to audio jack and never got any sound. Thanks!

I tried the tannisroot wyoming installer on my pi zero 2W with Raspberry Pi OS Bookworm Lite 64-bit, but still get no sound from respeaker card. I have not gotten any respeaker or waveshare wm8960 sound cards to work on Pi Zero, but waveshare cards work on Pi4/P5 just fine. Any ideas?
pi@pi0:~ $ sudo systemctl status seeed-voicecard.service ● seeed-voicecard.service - Seeed Voicecard service Loaded: loaded (/lib/systemd/system/seeed-voicecard.service; enabled; preset: enabled) Active: active (exited) since Tue 2024-07-09 11:49:48 CDT; 2min 55s ago Process: 1145 ExecStart=/usr/bin/seeed-voicecard (code=exited, status=0/SUCCESS) Main PID: 1145 (code=exited, status=0/SUCCESS) CPU: 505ms
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2 Jul 09 11:49:48 pi0 seeed-voicecard[1184]: No state is present for card vc4hdmi Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2 Jul 09 11:49:48 pi0 seeed-voicecard[1184]: Found hardware: "vc4-hdmi" "" "" "" "" Jul 09 11:49:48 pi0 seeed-voicecard[1184]: Hardware is initialized using a generic method Jul 09 11:49:48 pi0 seeed-voicecard[1184]: No state is present for card vc4hdmi Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2 Jul 09 11:49:48 pi0 seeed-voicecard[1185]: + aplay -l Jul 09 11:49:48 pi0 seeed-voicecard[1186]: + grep -q 'bcm2835 ALSA' Jul 09 11:49:48 pi0 systemd[1]: Finished seeed-voicecard.service - Seeed Voicecard service.

FYI my changed were merged and it's ok to use master now


docs(README): add more installation usage

Before creating my pull-request, I ensure:

[x] Documentation is written
[x] Unit tests are written and green
[x] I've cleaned my WIP or meaningless commits
[x] Examples are up-to-date

Codecov Report

Merging #21 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #21   +/-   ##
=======================================
  Coverage   91.48%   91.48%
=======================================
  Files           4        4
  Lines         141      141
=======================================
  Hits          129      129
  Misses          9        9
  Partials        3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e357f9b...e2c5a37. Read the comment docs.


feat: editor redesign 🔥

This PR attempts to tackle a feat no smaller than giving the editor a comprehensive facelift. 🎨 Due to the massive scale of changes, it is quite possible that:

there may be some regressions either in terms of functionality or form
some areas might have been left unattended and still need some work
some design choices that looked good on "paper" don't translate well to the highly dynamic nature of the editor in actual use

Further, looks & usability on small devices may be so-so in some places, although I did try to make sure nothing was outright broken.
I have marked some open issues/questions with the following comment in code:
// TODO barnabasmolnar/editor-redesign
For instance, there are some icons missing from the new icon set (eg "group", "ungroup").
Since I've been working on this for a while, I might have developed some tunnel-vision and it's not impossible that some super obvious things have escaped my attention. My apologies if that were indeed the case!
Hopefully, however, this PR provides a strong foundation for thorough testing and any potential suggestions for improvement.
Your findings and comments are much appreciated.
I think it might make sense to group your findings according to the list I have drawn up in the beginning of this PR:

bugs, regressions
missing styling and/or styling inconsistencies, deficiencies
issues with things interacting with each other in unexpected ways

Boom! 💥
Playing with it and loving it.
Some notes & points for discussion for both you @barnabasmolnar and for Tony, you'll need to sort it out :). The design points we can discuss offline.

The welcome screen:

should have pointer-events: none except for the actionable buttons which will reset the pointer-events. Right now interacting with the canvas is blocked by it, as well as other things like pasting.
Maybe the contract (especially in dark mode) is too low after all. TBD.
we need to figure out how to make it customizable

UI too large on FHD (1080px) screen (and lower?). Looks 👍 on QHD (2K) screen. Prob needs 36px sizing for the toolbar, via @maielo

sidebar:

swap the button groups position

shadow maybe too strong? Plus it should revert to regular shadow on dock.

don't display library button when library sidebar is docked

I'd also argue to move out (some of) the context buttons out of the dropdown (or figure something else out) because there's 0 indicator that selecting a library item (or multiple) has some effect on actions you can do on it. We'll discuss that elsewhere.
The added friction is also too much, e.g. when you're trying out different libraries and are deleting often (or when creating libs).

the loading state for library is not great. The spinner renders in wrong places (and in different places depending on whether something is already in library or not) and also results in layout shift.

language select

collab button needs active state when collaborating (similar to current production)

edges buttons not very differentiated (on smaller sizes?). Perhaps not a problem since you'll always be toggling from one to the other.

arrowheads

no active state (same as production 🤔)
the popup blends too much with the sidebar. Maybe we should give it more a stronger shadow
the popup buttons are lighter gray than regular buttons for some reason. Hard to read esp in dark mode.

align buttons when 2 elements are selected incorrectly flow to the wrong row. I.e. they should not mingle.

production:

hamburger menu should IMO be offset so it doesn't overlap with the sidebar 1:1. Makes those menus blend too much together, and/or give it a stronger shadow (only when sidebar is also open at the same time?)...

Opening a dialog should either close the hamburger menu, or when you close the dialog, it should keep the hamburger menu open. I'm siding with the latter, but could be swayed either way.

Padding difference between Stroke → Stroke Width and Stroke → background. Also causing visual layout shift when selecting items.

I'm not quite convinced the b/w colors convey information as for what is the selected element (without having to inspect closely). I'll let other comment on this.

Seeing this in practice, the visual difference is actually kinda weird. I'm not sure if it really makes sense. Also I'm still not super keen on the island shadows.

The bottom right buttons: not sure the switch to vertical stacking makes sense here as we don't use it anywhere else.

incorrect color of the hints in dark mode (too pronounced vs light mode)

Super 🔥 🔥 🔥 !!!
Extremely looking forward to ship this :) :)
What i found apart what @dwelle already mentioned

wierd jumping of toolbar when opening and closing libs
when refreshing page flickering "splash screen"
36px for tool icons on FHD.
wrong font (arial, should be assistant, at least in hamburger menu) - https://fonts.google.com/specimen/Assistant?vfquery=assista
hamburger menu items are too large on FHD and less resolution - per design it should have 32px height, right now it has 39px;
we need to figure out how to allow host apps to change splashscreen (talking about plus), hamburger menu items (plus again)
i am going to give you real text for splashscreen
missing "got to E+" button for already signed users who go to editor (imho should be in splashscreen and somewhere else if content is there)
can't paste images when splashscreen is on

would use "Start collaboration" ??? what others think?

I don't have much feedback as most of it has already been written by @maielo and @dwelle.
But my main question is - wouldn't it be better to have a Live collaboration button next to the hamburger menu? I don't know, but for some reason it doesn't feel right to have it next to the Libraries on the right side. Maybe it's because I'm used to the current version where it's also on the left side. But maybe that's why we should keep it there. And yes, I didn't realize this before 😃 I had to see it live.

would use "Start collaboration" ??? what others think?
Well, considering most of the other actions (maybe all of them) in hamburger menu are named with a "verb", it would make sense .. But people are used to Live collaboration, so ....

But my main question is - wouldn't it be better to have a Live collaboration button next to the hamburger menu? I don't know, but for some reason it doesn't feel right to have it next to the Libraries on the right side.

Yeah, I'm not against putting it to the left side. The argument was that most apps put it on the right so that's what people expect. I didn't do any research myself so can't say how prevalent it is.
But, I would also not rule out putting the "export to image" button next to hamburger as it's quite a common action.

This looks amazing 🔥🔥, great work @barnabasmolnar ❤
A few points in addition to what already addressed above

The popup would be better to move below like it is now in the current version so it doesn't block the hex code, in case I want to update hex after opening the popup

In dark mode I feel the splash screen font color is not that visible so may be lighten it a bit so its more readable

Using a version lighter it looks better (var(--color-gray-70))

How about putting the lock button on the right side instead of the left since in mobile we show it right next to the eraser ? so position will almost remain same when device dimensions changes

Shouldn't we use the primary color shade when selecting in context menu ?

As per the edges I think the dotted lines are making it look more similar so we might want to remove the dotted lines to make it clear or improve the edges in the icons so its more distinct (The prod is more clear)

Should we rename "load" to "Import" ? I think its more intuitive, or maybe "Open"  but to align with "export", "import" would sound better.

port" ?

I misunderstood this as sharing the read-only link of excalidraw eg in social accounts. We should use the collab icon of people which we use inside the hamburger menu as well

Also, I like "Start collaboration" more - probably because that's I am used to and when it comes to collaborations it's going to be live so maybe putting live is redundant. So "Start" looks better to me.

Should we also add a link to discord in the help dialog?

Some suggestions regarding the hamburger menu

Let's add tooltips for undo/redo. Later we should move to using our tooltip everywhere.

Also in the current editor, pressing the properties button while editing a text element finalizes the text, without opening the properties panel.  Besides finalizing the text, the text element further becomes unselected.

My main comment pertains to additional suggestions for improving the current editor. When in mobile form factor (eg side-by-side desktop windows), the element properties panel can fill most of the window, obscuring the selected element(s). A keyboard shortcut to hide the props panel, without finalizing the editing element, could also help.

Yep. The mobile redesign will come later, we haven't really touched it in this one (apart from using the same styleguide).

Also in the current editor, pressing the properties button while editing a text element finalizes the text, without opening the properties panel. Besides finalizing the text, the text element further becomes unselected.

Cannot repro. IMO it works the same as current production?

There's also a few things with the WelcomeScreen we should fix:

[ ] some basic RTL support (e.g. when you pick an arabic language):

[ ] the welcome screen should account for screen sizes. Maybe hide the arrows and keep the center. If even the center doesn't fit, hide it as well? On mobile we can show the center if it fits, as well.

[ ] Also, we need to put all labels (not just welcomeScreen labels) into en.json

Also, we need to put all labels (not just welcomeScreen labels) into en.json fo i18n (and use {t("path.to.translation")})

They are. I even wrote the Hungarian translations for them. 🇭🇺 😃
https://github.com/excalidraw/excalidraw/pull/5780/files#diff-b1791c7a47875ce85f2f1e57ef6c25a9b993660f9bcc840d8f21daac6161b5a0

They are. I even wrote the Hungarian translations for them. 🇭🇺

ok, nvm. I don't know why I (wrongly) assumed instead checking, sorry! But, I don't know if Crowdin will catch the HU translations, or it needs it to be done from their UI. We'll see!

Moving the unresolved TODOs from previous comments (mine & @maielo's) here.

[ ] ⚠⚠⚠ collab button needs active state when collaborating (similar to current production)

edges buttons not very differentiated (on smaller sizes?). Perhaps not a problem since you'll always be toggling from one to the other.

[ ] copy change?

would use "Start collaboration" ??? what others think? (@maielo)

[ ] (?? --- I haven't checked if still unresolved) missing "got to E+" button for already signed users who go to editor (imho should be in splashscreen and somewhere else if content is there)

[ ] Opening a dialog should either close the hamburger menu, or when you close the dialog, it should keep the hamburger menu open. I'm siding with the latter, but could be swayed either way.

[ ] Seeing this in practice, the visual difference is actually kinda weird. I'm not sure if it really makes sense. Also I'm still not super keen on the island shadows.

Not blocking. But needs some thought and review later:

sidebar: the added friction of hiding some of the context buttons in the dropdown is still "too damn  high"

[ ] arrowheads: still not sure about the the popup blending too much with the sidebar:

[ ] I'm not quite convinced the b/w colors convey information as for what is the selected element (without having to inspect closely). I'll let other comment on this.
IMO we won't do anything with this because "it looks good", but just for the record.

Ad @ad1992's points:

The popup would be better to move below like it is now in the current version so it doesn't block the hex code, in case I want to update hex after opening the popup

We'll be redesigning the color picker as per Figma soon so it doesn't matter.

How about putting the lock button on the right side instead of the left since in mobile we show it right next to the eraser ? so position will almost remain same when device dimensions changes

Mobile UI is orthogonal here I'd say, and we'll be redesigning it anyway. But There may be an arugment made. Let's keep it as is for now so we don't ship too many "breaking changes" to the UI and we'll see later.

Shouldn't we use the primary color shade when selecting in context menu ?

Contextmenu needs a complete overhaul after we ship this.

As per the edges I think the dotted lines are making it look more similar so we might want to remove the dotted lines to make it clear or improve the edges in the icons so its more distinct (The prod is more clear)

Hard agree. The only salient argument to ignore this is that you won't really be looking at the buttons after you do it once or twice, and simpyl switch to the other one. But still not a good argument to keep it I think.

Should we rename "load" to "Import" ? I think its more intuitive, or maybe "Open"  but to align with "export", "import" would sound better.

I'd go with "Open", maybe.

I misunderstood this as sharing the read-only link of excalidraw eg in social accounts. We should use the collab icon of people which we use inside the hamburger menu as well

I agree here as well. @maielo is trying to convince me "everybody else" is using it. I'm not sure. We'll need to revisit this.

Should we also add a link to discord in the help dialog?

Help dialog will need a complete overhaul as well.

should we increase hamburger menu width? Most languages won't fit export as image after we've added the shortcut:

Pushed a fix regarding client initials being blank when containing trailing spaces - Thanks to the test!

Yay! Thanks everyone! ❤ 🚀
(We'll fix tests in post.)


Fix netFrameworkVersion for dotnet-isolated 5 apps

cc @safihamid

Please create a new 'release' for functions-tag-v3 to point to, and update within that.  Otherwise, VS Win for sure won't see the updated values as 'new' and therefore will use the existing serialized settings ("v5" for netFrameworkVersion)

@soninaren / @fabiocav - Please feel free to close this PR or re-purpose to address the comments. Thanks!

Thank you! @soninaren will follow up with an update.


[Feature Request] Gain optional claims from IDToken

Is your feature request related to a problem? Please describe.
I have configured optional claims on my app registration. After calling result, err := devCode.AuthenticationResult(ctx), the claim is part of the IDToken, but not accessible through the go struct.
Describe the solution you'd like
Make all optional claim available as struct Field.
Describe alternatives you've considered
Use the AdditionalFields field for non-defined fields.

Why not use the AdditionalFields ? I don't think we should be adding explicit support for a subset of optional claims.
Besides, I believe AAD already has Conditional Access policies to prevent or force MFA based on IP address..


Compile of MLPerf 3D-Unet on BraTS 2019 model 224_224_160_dyanmic_bs.onnx fails with Assertion `!outputShape.hasValue() && "unhandled option in ConvTranspose"' failed

Trying to compile the MLPerf model 224_224_160_dyanmic_bs.onnx fails with the message:
onnx-mlir: /onnx-mlir/src/Dialect/ONNX/ONNXOps.cpp:2137: mlir::LogicalResult mlir::ONNXConvTransposeOp::inferShapes(std::function<void(mlir::Region&)>): Assertion `!outputShape.hasValue() && "unhandled option in ConvTranspose"' failed.

The model is here:
https://github.com/mlcommons/inference/tree/master/vision/medical_imaging/3d-unet-brats19
https://zenodo.org/record/3928973#.Yu022_HMIYE
The compile was with onnx-mlir version:
onnx-mlir version 0.3.0, onnx version 1.11.0 (https://github.com/onnx/onnx-mlir.git 57ca5af90cccdf8a1b0c3aa7426f021845fab544)
  LLVM version 15.0.0git<EMAIL_ADDRESS>e829978c1e3b06b4372ba0d01b2d4f4608c59151)
  Optimized build with assertions.
  Default target: s390x-ibm-linux
  Host CPU: z14

Please investigate this compile failure. Thanks.

I didn't get this error when using 6fd7f69d4ad0a36f927082832093b8e575635545. It seems shape inference for ConvTransposeOp works now.
And now I got the same with static model https://github.com/onnx/onnx-mlir/issues/1585


Add JDK 21 images from Temurin

Added JDK 21 images from Temurin
Exclude semeru idk from ci tests as arm64 edition not available (to resolve ci error)

Hi @softinio ! Thanks for opening this PR. Sorry, I've left this repository unmaintained for the past few months. Do you need me to also update all JDK images to their latest versions?

@vasilmkd Thank you so much for review and merge!

Do you need me to also update all JDK images to their latest versions?

You don't need to do that for my benefit! I just wanted Temurin option for JDK 21 so all good my end.
Thanks again for help. Keep in touch.
ps: As time allows happy to help with maintaining this repo so more PRs from me to come.


A note on AppArmor and WSL

Just a quick note to let you know that I've had a patch accepted into AppArmor (and have a similar one awaiting review for snapd) to support running under WSL:
https://gitlab.com/apparmor/apparmor/-/merge_requests/812
As suggested in the comments there, there's a potential issue with AppArmor profiles leaking from distro to distro and/or from container to container because of WSL's architecture, so to avoid this problem in genie, I've arranged for it to create an AppArmor namespace before starting systemd (if AppArmor support is detected in the kernel) to prevent potential leakage.
Thought I'd let the other authors of WSL systemd hacks know in case you wish to take similar measures. In case it might be useful, my implementation of this can be found here, called from here.
Regards,
Alistair
genie developer

Sorry about the delay in getting to this. I will try to work on implementing this tomorrow in a Twitch stream. Thanks for letting me and others know about the issue. 💜

Hi Alistair,
I've implemented the changes as close as I could determine from reading the genie source. I'm not sure I've got it right, as profiles still seem to be leaking. Could you check my code and see if you can see any problems with my implementation that are causing it to not be correct?
https://github.com/diddledani/one-script-wsl2-systemd/tree/apparmor-namespace

The code looks fine to me on first look, alas.
This is probably too obvious, but how are you detecting the leakage? If I look at AppArmor profiles from outside the bottle, or from another distro, I can still see them --
pallas:/proc# aa-status
apparmor module is loaded.
113 profiles are loaded.
77 profiles are in enforce mode.
   :genie-Debian:/snap/core/13308/usr/lib/snapd/snap-confine
   :genie-Debian:/snap/core/13308/usr/lib/snapd/snap-confine//mount-namespace-capture-helper
   :genie-Debian:/usr/bin/evince
   :genie-Debian:/usr/bin/evince-previewer
   :genie-Debian:/usr/bin/evince-previewer//sanitized_helper
   :genie-Debian:/usr/bin/evince-thumbnailer
   ...

etc., etc., but none of those profiles will be enforced in that distro because they're inside the genie-Debian AA namespace and only affect things explicitly placed into it with aa-exec (or those processes' children), so if that's what you're seeing, that's expected behavior.
It's only the ones that look like:
apparmor module is loaded.
113 profiles are loaded.
77 profiles are in enforce mode.
   /snap/core/13308/usr/lib/snapd/snap-confine
   /snap/core/13308/usr/lib/snapd/snap-confine//mount-namespace-capture-helper
   /usr/bin/evince
   /usr/bin/evince-previewer
   /usr/bin/evince-previewer//sanitized_helper
   /usr/bin/evince-thumbnailer
   ...

without a namespace prefix (as reported from inside the systemd bottle which we aa-execed into that namespace) that'll actually be enforced.
Sorry if you knew all that, but it wasn't obvious to me on first cut, so I had to ask.

I installed a separate Ubuntu instance and checked the aa-status there - it was identical to the one inside the Systemd namespace.

Hm. That's odd. I'll poke at it some more.

Looks like I was wrong. The profiles aren't leaking - the issue was I already had leaked profiles before I restarted the distro with the patch so they stayed leaked. After a full shutdown of wsl2 everything is hunky dory :-)


Issue with GPU allocation (only occurs when running SAC not PPO)

Hi, I am trying to run my environment using MJX, and everything works perfectly fine when I use PPO. When using PPO I can easily go to over 8000 environments, with batch size over 1000 without any memory issues. However, no matter what setting I try when running SAC, it becomes a different story (even with a batch size of 32, and 1 environment it fails). I just cannot avoid running into the memory allocation issue copy/pasted below. Any help would be greatly appreciated, because for my particular environment (through trying it using other simulators) it can only really train using the SAC algorithm not PPO, so I really do need to use SAC. Any help would be greatly appreciated.
My computer has a Nvidia 4090 GPU.
Running this training:
train_fn = functools.partial(
sac.train, num_timesteps=30_000_000, num_evals=1,
episode_length=INITIAL_PARAMS.RL_PARAMS.MAX_EPISODE_TIMESTEPS, normalize_observations=True, action_repeat=1,
num_envs=1, batch_size = 32, seed=0)
Getting this error:
2024-02-19 15:14:56.882326: W external/xla/xla/service/hlo_rematerialization.cc:2941] Can't reduce memory use below -30.29GiB (-32529110990 bytes) by rematerialization; only reduced to 49.62GiB<PHONE_NUMBER>0 bytes), down from 49.62GiB<PHONE_NUMBER>0 bytes) originally
2024-02-19 15:15:06.899957: W external/tsl/tsl/framework/bfc_allocator.cc:487] Allocator (GPU_0_bfc) ran out of memory trying to allocate 49.62GiB (rounded to<PHONE_NUMBER>0)requested by op
2024-02-19 15:15:06.900601: W external/tsl/tsl/framework/bfc_allocator.cc:499] ____******
E0219 15:15:06.900728    6066 pjrt_stream_executor_client.cc:2766] Execution of replica 0 failed: RESOURCE_EXHAUSTED: Out of memory while trying to allocate<PHONE_NUMBER>0 bytes.
BufferAssignment OOM Debugging.
 Set JAX_TRACEBACK_FILTERING=off to include these.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/sclaer/ASCENT_biped/sim/mujoco/rl_mjx.py", line 367, in
make_inference_fn, params, _= train_fn(environment=env, progress_fn=progress)
File "/home/sclaer/ASCENT_biped/venv/lib/python3.10/site-packages/brax/training/agents/sac/train.py", line 429, in train
buffer_state = jax.pmap(replay_buffer.init)(
jaxlib.xla_extension.XlaRuntimeError: RESOURCE_EXHAUSTED: Out of memory while trying to allocate<PHONE_NUMBER>0 bytes.
BufferAssignment OOM Debugging.
 So a replay buffer of 30 million is being initialized which captures the VRAM. Try specifying max_replay_size to a smaller value and things should work.

Awesome, thanks my RL is working now with that change.


Import finalizer logic from miniscript

Import the psbt module from rust-miniscript while tip of master was at a280447. Then go wild refactoring the miniscript stuff.

Only change was to use the newly released version of miniscrpt (v11.0.0) and remove the patch section from the manifest.


Master release: CLI tools for Hypha and exchanges + vesting CLI commands for exchanges

:tada: This issue has been resolved in version 0.25.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


not contain install-id and session-id in UA when allowTelemetry is false

Codecov Report

Merging #71 into master will increase coverage by 0.07%.
The diff coverage is 100%.

@@           Coverage Diff            @@
##           master    #71      +/-   ##
========================================
+ Coverage   65.92%    66%   +0.07%
========================================
  Files          44     44
  Lines        1353   1356       +3
  Branches      142    143       +1
========================================
+ Hits          892    895       +3
  Misses        410    410
  Partials       51     51

Impacted Files
Coverage Δ

...a/com/microsoft/azure/maven/AbstractAzureMojo.java
71.13% <100%> (+0.92%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d1e1f8...42b898d. Read the comment docs.


Adding MAC OS support

The reason this code does not run on macOS is because it relies on the PyAudioWPatch library for recording sound from speakers. This library specifically utilizes the Windows Audio Session API (WASAPI), enabling the use of output devices that support this API in loopback mode.
To make the code work on macOS, we would need a comparable feature that can record sound from speakers. The primary modifications would be required in the DefaultSpeakerRecorder class, where we currently use WASAPI to create the audio stream for recording. A potential solution could be leveraging tools like BlackHole to achieve similar functionality on macOS.

I would like to try to work on this in my mac :)

for MacOS you can change in python code in AudioRecorder.py, AudioTranscriber.py and custom_speech_recognition/init.py
import pyaudio
#import pyaudiowpatch as pyaudio

to disable windows only library and also add changes to requirements.txt to install pyaudio instead of pyaudiowpatch and some brew :
brew install portaudio
brew install<EMAIL_ADDRESS>
but still have error:
[INFO] Completed ambient noise adjustment for Default Mic.
Traceback (most recent call last):
  File "/Users/user/git_repo/ecoute/main.py", line 119, in <module>
    main()
  File "/Users/user/git_repo/ecoute/main.py", line 76, in main
    speaker_audio_recorder = AudioRecorder.DefaultSpeakerRecorder()
  File "/Users/user/git_repo/ecoute/AudioRecorder.py", line 38, in __init__
    with pyaudio.PyAudio() as p:

Likewise, after installing it on the Mac, I just left the pyaudio library, because it pyaudiowpatch was not installed and the error remained:
[INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic...
[INFO] Completed ambient noise adjustment for Default Mic.
Traceback (most recent call last):
File "/Users/alisarussen/Desktop/script/main.py", line 119, in
main()
File "/Users/alisarussen/Desktop/script/main.py", line 76, in main
speaker_audio_recorder = AudioRecorder.DefaultSpeakerRecorder()
File "/Users/alisarussen/Desktop/script/AudioRecorder.py", line 37, in init
with pyaudio.PyAudio() as p:
AttributeError: enter
Help optimize

@slawa-c i tried that workaround but still getting same error on req installation

I'd love seeing this running on mac os 🙏

I did it on my Macbook, but without recognizing the sound from the speakers, only from the microphone. It also works fine if you output sound to an external speaker, but then the application does not distinguish between audio streams. I'm surprised it doesn't automatically detect the Whisper API 🤨
Here's a list of changes I made in addition to the tips above:
AudioRecorder.py
class DefaultSpeakerRecorder(BaseRecorder):
    def __init__(self):
    # Placeholder for macOS support
        pass

AudioTranscriber.py
class AudioTranscriber:
    def __init__(self, mic_source, model):

"Speaker": {
                "sample_rate": mic_source.SAMPLE_RATE,
                "sample_width": mic_source.SAMPLE_WIDTH,
                "channels": mic_source.channels,
                "last_sample": bytes(),
                "last_spoken": None,
                "new_phrase": True,
                "process_data_func": self.process_speaker_data
            }

main.py
    transcriber = AudioTranscriber(user_audio_recorder.source, model)

Is there a way I can configure this on my Mac that currently runs on 12.6.6?

Everybody with successful tests here. How do you deal with PyAudioWPatch ?

I don't know if it would be helpful, but I wonder if something like Soundflower or it's 'cousin' Loopback would be helpful!
Especially with seeing that it seems like audio can be 'heard' from a mic, but not the speakers, maybe turning the speakers into a mic would be a good thing to explore?

I have a PR for getting it to work on mac

I launch it in my M1 mac, just get a blank pannel
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. [INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic... [INFO] Completed ambient noise adjustment for Default Mic. [INFO] Adjusting for ambient noise from Default Speaker. Please make or play some noise from the Default Speaker... [INFO] Completed ambient noise adjustment for Default Speaker. READY

you may need install python3.10 & brew install<EMAIL_ADDRESS>& pip install tk

Hi Laisky,  thanks a lot for your quick response.
I did all things you suggested, still have the same issue.
Python:  3.10.3
<EMAIL_ADDRESS>tk-0.1.0

also I get this error for pip install -r requirements.txt on python 3.11.3
Building wheel for pyaudio (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pyaudio (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-x86_64-cpython-311
      creating build/lib.macosx-12-x86_64-cpython-311/pyaudio
      copying src/pyaudio/__init__.py -> build/lib.macosx-12-x86_64-cpython-311/pyaudio
      running build_ext
      building 'pyaudio._portaudio' extension
      creating build/temp.macosx-12-x86_64-cpython-311
      creating build/temp.macosx-12-x86_64-cpython-311/src
      creating build/temp.macosx-12-x86_64-cpython-311/src/pyaudio
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DMACOS=1 -I/usr/local/include -I/usr/include -I/opt/homebrew/include -I/Users/alireza/github/ecoute/env/include<EMAIL_ADDRESS>-c src/pyaudio/device_api.c -o build/temp.macosx-12-x86_64-cpython-311/src/pyaudio/device_api.o
      src/pyaudio/device_api.c:9:10: fatal error: 'portaudio.h' file not found
      #include "portaudio.h"
               ^~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyaudio
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=492022 sha256=d52c95c1be769f66c49f623e6fabc3c95421baaa0de107479330dc3c1617de61
  Stored in directory: /Users/alireza/Library/Caches/pip/wheels/da/19/ca/9d8c44cd311a955509d7e13da3f0bea42400c469ef825b580b
Successfully built openai-whisper Wave future
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects

brew install portaudio fixes the issue

any one want to try it on mac, can check this https://github.com/clevertang/ecoute

I used https://existential.audio/blackhole/ for collecting audio and selecting which channels I want to record

any one want to try it on mac, can check this https://github.com/clevertang/ecoute

So far seem to be making the most progress on this one. One of the things I've picked up that you can maybe add to documentation:
You need to include an entry in the keys.py file denoting the device name. I found my device name by executing "system_profiler SPAudioDataType" in a terminal. My keys.py file has an entry now:
DEVICE_NAME="MacBook Pro Microphone"

I used https://existential.audio/blackhole/ for collecting audio and selecting which channels I want to record

And, hopefully this helps someone else on a Mac once day. If you're getting to the point where the interface is starting, but you're getting a blank window.. You're close and it's probably your version of Python that is outdated. I eventually settled on 3.11.1. In order to get there:
pip freeze > requirements-lock.txt
pyenv virtualenv-delete ecoute
pyenv install 3.11.1
pyenv virtualenv 3.11.1 ecoute
pyenv activate ecoute
pip install -r requirements-lock.txt


Failed to execute 'observe' on 'IntersectionObserver'

Qwik Version
0.0.100
Operating System (or Browser)
osx
Node Version (if applicable)
No response
Which component is affected?
Qwik Runtime
Expected Behaviour
When trying to bind to a document element by ID I am getting an error:
Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'. TypeError: Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'.
    at useClientEffectQrl (http://<IP_ADDRESS>:5173/node_modules/@builder.io/qwik/core.mjs?v=498fe5d2:3382:23)
    at Login_component_FYibw9YFqrU (http://<IP_ADDRESS>:5173/src/login_component_fyibw9yfqru.js?t=1660286532256:10:5)

This was working in 0.0.30 and is now failing in 0.0.100. I using Firebase and the FirebaseUI to handle the login forms etc. I may not be following the best practice and would be happy to update docs once I've got it worked out. I had thought that useClientEffect ran after client render, but presume that is wrong?
Whats the proper pattern for binding code to an element after its rendered?
import { component$, useClientEffect$, useStyles$ } from<EMAIL_ADDRESS>import { EmailAuthProvider, getAuth, GoogleAuthProvider } from "firebase/auth";
import { auth } from "firebaseui";
import fbUiCSS from "firebaseui/dist/firebaseui.css";

export const Login = component$(() => {
  useStyles$(fbUiCSS);
  useClientEffect$(() => {
    const userAuth = getAuth();
    const ui = new auth.AuthUI(userAuth);
    const uiConfig = {// UI Config options};
    ui.start("#firebaseui-auth-container", uiConfig);
  });

  return (

  );
});

Actual Behaviour
Browser error on render
Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'. TypeError: Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'.
    at useClientEffectQrl (http://<IP_ADDRESS>:5173/node_modules/@builder.io/qwik/core.mjs?v=498fe5d2:3382:23)
    at Login_component_FYibw9YFqrU (http://<IP_ADDRESS>:5173/src/login_component_fyibw9yfqru.js?t=1660286532256:10:5)

Additional Information
No response

Hey @oakmad! Does adding eagerness: load help?
useClientEffect$(() => {
    //...
}, { eagerness: 'load' });

, { eagerness: 'load' }

@nnelgxorz still not work for my case. here is reproduction https://stackblitz.com/edit/github-7rtfy5?file=src/components/logo/logo.tsx ,

Dang. I was hoping there would be a workaround. 😆 Thanks for trying it out. 👍


Bootstrap 3.3.6 LESS Problem

Hello,
My bower.json
    "bootstrap": "3.3.6",
    "bootstrap-markdown": "^2.10.0"

LESS compiler makes error:
Less Compilation Failed: variable @table-border-color is undefined in file /bower_components/bootstrap-markdown/less/bootstrap-markdown.less line no. 10

I think bootstrap-markdown not working with bootstrap 3.3.6 version.

@erayaydin You need to reference bootstrap less files.

I referenced bootstrap less file but in bootstrap's variables.less  file there is no @table-border-color . I think its removed in 3.3.6

@erayaydin You can use the latest master code for now, the fix will be included in the next release.

Thank you :+1:


Fix / position_executor for spot accounts

For spot trading (I trade on Binance), the commission is deducted from the balance of the base asset. For example, if you buy 60864 SHIB-USDT, binance charges a transaction fee of 60.86 SHIB. So the SHIB balance after “opening” the position would be 60864-60.86 = 60803.14.
But when it comes to closing (or setting a limit-TP order), hummingbot tries to send a sell order with the initial amount (60864 SHIB) and fails due to the error “Account has insufficient balance for requested action.”.
With the fixes I made, it subtracts the commission from the initial position size, so the close order (either a market at time_limit or a limit-TP order) is sent and executed correctly.
I also reverted the renew_take_profit_order call if the TP limit-order has an incorrect amount. I don't know why it was removed (and renew_take_profit_order is never called after these changes).

@rapcmia let's review this one for spot!

PR update:

Run bots with v2 controller-config on both this PR and development branch to compare results
Confirmed changes on amount now reflected on orders used to close executors  (market or limit) ✅
Confirmed different close types worked event with partial fills

stop_loss, early_stop, time_limit, take_profit ✅

Run pmm_simple controller on binance 3/3 bots reviewed

Todo:

Found an instance of closeType early_stop with 0 values not recorded on logs but on executor table (sqlite) and exchange trade history investigating with dev branch
Need to run another connector to test using different controller-config not started

I noticed that it failed the code check: E226 missing whitespace around arithmetic operator.
Could you please run your code formatter so that we don't have to go through the hassle of new fixes and checks?

@cardosofede
Do you expect me to fix formatting?

I don't understand what I need to do. I followed the contribution guide, but it seems like there's something missing.

@komposter
The error says that there is a missing whitespace in the line 105. If you add that whitespace that part of the workflow should pass.

@cardosofede Is this rejected?

@cardosofede Is this rejected?

Hi @komposter the changes from this PR has been added to https://github.com/hummingbot/hummingbot/pull/7316/files#diff-05075a82519ee5d21dc0a05ccfd3b25143214f27b10b0a796bfa7fd97d7c8366


Markers are not moving onPress in iOS

Hi, currently I'm facing the issue in iOS. I have used google maps in iOS. The issue is like screen view is not moving when  another marker is pressed even if I set the property of MapView  moveOnMarkerPress={true} .
Is any solution there?

moveOnMarkerPress is an android only functionality, however, you could create your own work around through setState. If you handled onPress you could update the current region to move the map to the specified coordinates the Marker is set at. If you need some code to give you and idea feel free to let me know otherwise it is always good to try it out yourself first. Look at onRegionChange and how it interacts with the region rendered

Hey @ltchurch88t , it will be good if you share the code for it.

Below is the Map component I'm using. Here I'm passing multiple lat long coordinates. Now please refer this one and tell what I do for doing marker moving functionality in iOS too.
import React from 'react';
import { StyleSheet,Text,View }  from 'react-native';
import MapView,{PROVIDER_GOOGLE} from 'react-native-maps';
export default class ReactMap extends React.Component {
constructor(props){
super(props);
this.mapRef = null;
}
componentDidUpdate(){
    this.mapRef.fitToCoordinates(this.props.LatLongCoordinates,{ edgePadding: { top: 50, right: 10, bottom: 10, left: 10 }, animated: true });
}
render() {
    return (
        <MapView
		 maxZoomLevel={14}
       //minZoomLevel={3}
        zoomEnabled={true}
        moveOnMarkerPress={true}
        provider={PROVIDER_GOOGLE}
        style={styles.map}
        ref={(ref) => {this.mapRef= ref}}
        onLayout={() => this.mapRef.fitToCoordinates(this.props.LatLongCoordinates,{ edgePadding: { top: 50, right: 10, bottom: 10, left: 10 }, animated: true })}>
        {this.props.LatLongCoordinates.map((marker,i) =>   (
            <MapView.Marker key={i}
            zIndex={i}
            coordinate={marker}
            title={((marker.latitude).toString()+' , '+(marker.longitude).toString())}
            >
            <View style={styles.radius}>
            <View style={styles.markerStyle}/>
            </View>
           </MapView.Marker>
        ))}
        </MapView>

    );
}

}
const styles=StyleSheet.create({
container:{
position:'absolute',
top:0,
bottom:0,
left:0,
right:0,
justifyContent:'flex-end',
alignItems:'center'
},
map:{
position:'absolute',
top:0,
bottom:0,
left:0,
right:0,
borderColor:'black',
borderWidth:0.5
},
radius:{
height:15,
width:15,
backgroundColor:'#81BD26',
overflow:'hidden',
borderRadius:50/2,
borderWidth:1,
alignItems:'center',
justifyContent:'center'
},
markerStyle:{
height:10,
width:10,
backgroundColor:'#81BD26',
alignItems:'center',
justifyContent:'center'
}
});

Hey @ltchurch88t , any solution to this ?

@ShaikhKabeer is it absolutely essential to use the marker itself as the navigation tool or could you attribute the functionality elsewhere? For example on a carousel slider or button press in a separate view? The issue with iOS is the register of the marker press itself not mapping the component. Let me know as soon as you can and I will try and post code accordingly

Hey @ltchurch88t , as mentioned in the code above, I'm passing the no of Lat-Long objects and fitting those using fitToCordinates( ). So those markers are now fitting in the MapView. I'm showing Lat Long cordinate object for that particular marker. So when  I'm pressing particular marker for checking its cordinates then it is moving screen. So this behaviour is expected in both iOS and android but in iOS this particular marker is not moving the screen.

Hey guys! I'm a little late but maybe this helps, I'm gonna share you my code:
       <MapView
          ref={this.mapViewRef}
          moveOnMarkerPress
          tracksViewChanges={false}
          provider={PROVIDER_GOOGLE}
          style={styles.mapView}
          initialRegion={region}
          onRegionChangeComplete={this.onRegionChange}
          onMarkerPress={this.onMarkerPress}
        >

onMarkerPress = (event: Event) => {
    const { id, coordinate } = event.nativeEvent;
    const { region } = this.state;
    const newRegion = { ...region };

    newRegion.latitude = coordinate.latitude;
    newRegion.longitude = coordinate.longitude;

    this.setState(
      {
        region: newRegion,
      },
      this.goToPositionSelected,
    );
  };

The idea is after set the region in the state, call animateToRegion of the MapView ref:
  goToPositionSelected = () => {
    if (isAndroid) return;

    const { region } = this.state;

    this.mapView.animateToRegion(region);
  };

Based on eelmoni's solution(thanks a lot! 🙂) I created a hook to handle this. When I used Region, MapView always jumped back to the original zoom and pitch. If you allow zoom or pitch, a better solution is to use Camera instead of Region. There is an animateCamera function(which accepts Camera Partial as a parameter), with this you won't need state anymore.
Here is the solution:
export function useCameraFocus(): [
  React.RefObject<MapView>,
  (event: MapEvent) => void
] {
  const mapViewRef = useRef<MapView>(null)

    function onMarkerPress(event: MapEvent) {
    if (!mapViewRef.current || Platform.OS === 'android') {
      return
    }

    const { coordinate } = event.nativeEvent

    mapViewRef.current.animateCamera(
      {
        center: {
          latitude: coordinate.latitude,
          longitude: coordinate.longitude,
        },
      },
      { duration: 200 }
    )
  }

  return [mapViewRef, onMarkerPress]
}

Just use it in Map component:
  ...
  const [mapViewRef, onMarkerPress] = useCameraFocus()

  return (
    <MapView
      ref={mapViewRef}
      provider={PROVIDER_GOOGLE}
      scrollEnabled={true}
      zoomEnabled={true}
      rotateEnabled={true}
      zoomTapEnabled={true}
      initialCamera={initialCamera}
      onMarkerPress={onMarkerPress}
    >
  ...


Crash on windowVisibleChanged

I got a crash report on firebase with the below log
LGAlertViewWindowsObserver windowVisibleChanged
Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0xf2a4 __abort_with_payload + 8
1  libsystem_kernel.dylib         0x32c8c abort_with_payload_wrapper_internal + 104
2  libsystem_kernel.dylib         0x32c24 abort_with_payload_wrapper_internal + 30
3  libobjc.A.dylib                0x3ba94 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116
4  libobjc.A.dylib                0x3ba20 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 30
5  libobjc.A.dylib                0x7ca0 weak_register_no_lock + 396
6  libobjc.A.dylib                0xdbf0 objc_initWeak + 440
7  DroneNation                    0xad7b0c -[LGAlertViewWindowsObserver windowVisibleChanged:] + 73 (LGAlertViewWindowsObserver.m:73)
8  CoreFoundation                 0x41018 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 148
9  CoreFoundation                 0xd8724 ___CFXRegistrationPost_block_invoke + 88
10 CoreFoundation                 0xbcf50 _CFXRegistrationPost + 440
11 CoreFoundation                 0x53428 _CFXNotificationPost + 724
12 Foundation                     0x5a640 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
13 UIKitCore                      0x1f5e0c -[UIWindow _setHidden:forced:] + 708
14 UIKitCore                      0x10a391c -[UIAutoRotatingWindow _didRemoveSubview:] + 112
15 UIKitCore                      0x885dc __UIViewWasRemovedFromSuperview + 148
16 UIKitCore                      0x855b0 -[UIView(Hierarchy) removeFromSuperview] + 240
17 UIKitCore                      0x2954c0 -[UIWindow _removeAllViewControllersFromWindowHierarchyFromDealloc:] + 412
18 UIKitCore                      0x3075f4 -[UIWindow dealloc] + 296
19 UIKitCore                      0x66db5c -[UIRemoteInputViewHost .cxx_destruct] + 44
20 libobjc.A.dylib                0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116
21 libobjc.A.dylib                0x7120 objc_destructInstance + 80
22 libobjc.A.dylib                0x10fe8 _objc_rootDealloc + 80
23 UIKitCore                      0x4ad844 -[UIKeyboardSceneDelegate .cxx_destruct] + 120
24 libobjc.A.dylib                0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116
25 libobjc.A.dylib                0x7120 objc_destructInstance + 80
26 libobjc.A.dylib                0x10fe8 _objc_rootDealloc + 80
27 UIKitCore                      0x481008 -[UIKeyboardSceneDelegate dealloc] + 288
28 CoreFoundation                 0x753f0 -[__NSArrayI_Transfer dealloc] + 84
29 libobjc.A.dylib                0x15cc AutoreleasePoolPage::releaseUntil(objc_object**) + 196
30 libobjc.A.dylib                0x5ea4 objc_autoreleasePoolPop + 260
31 FrontBoardServices             0x55c0 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 176
32 FrontBoardServices             0x16fac __84-[FBSWorkspaceScenesClient _queue_invalidateScene:withTransitionContext:completion:]_block_invoke + 292
33 libdispatch.dylib              0x4378 _dispatch_client_callout + 20
34 libdispatch.dylib              0x7dc0 _dispatch_block_invoke_direct + 284
35 FrontBoardServices             0xe230 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 52
36 FrontBoardServices             0x65d68 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240
37 FrontBoardServices             0x65e94 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28
38 CoreFoundation                 0xd109c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
39 CoreFoundation                 0xdc59c __CFRunLoopDoSource0 + 176
40 CoreFoundation                 0x69d7c __CFRunLoopDoSources0 + 244
41 CoreFoundation                 0x7c114 __CFRunLoopRun + 828
42 CoreFoundation                 0x80db0 CFRunLoopRunSpecific + 600
43 GraphicsServices               0x1224 GSEventRunModal + 164
44 UIKitCore                      0x39164c -[UIApplication _run] + 888
45 UIKitCore                      0x3912b0 UIApplicationMain + 340
46 DroneNation                    0x44f4f4 main + 14 (main.m:14)
47 ???                            0x1c69df4f8 (Missing)

anyone knows any fix for this? @gKamelo @heroims @Friend-LGA

Until I figured it out. So far, I only see that this happens only on iOS 17 and when the application goes into the background.

Until I figured it out. So far, I only see that this happens only on iOS 17 and when the application goes into the background.

What's happening is when user puts app in recent list for force closing the app and as soon as user force close the app the device is rebooted.

@rahulvyas  , Any solution found?

@rahulvyas , Any solution found?

Not yet :(

you can remove __weak UIWindow *weakWindow = window; to try to fix this problem.

you can remove __weak UIWindow *weakWindow = window; to try to fix this problem.

Can you create a fork and include other fix as well. I mean this pull request (https://github.com/Friend-LGA/LGAlertView/pull/84)

@JGideon Have you created a new fork?

__weak UIWindow *weakWindow = window;

What should I put after removing this?

__weak UIWindow *weakWindow = window;

What should I put after removing this?

Just use window instead of weakWindow.


Refresh files using emitter instead of fileList

This PR simplifies dependency list and fixes #62

fixed by #63


Expose OS.read_string_from_stdin() to the scripting API (3.x)

3.x version of https://github.com/godotengine/godot/pull/65751. See https://github.com/godotengine/godot-proposals/issues/2322.
This can be used in scripts to read user input in a blocking manner.
This also removes the unused block argument, which is always true.

Maybe @bruvzg knows about resolving this encoding issue?

Decoding is missing completely, so it's reading it as Latin-1. Fix - https://github.com/godotengine/godot/pull/70389

I've noticed that stdin length is limited to 1024 bytes:
https://github.com/godotengine/godot/blob/cf603aae8b7de7dd91066003b9898a97373eeed8/platform/windows/os_windows.cpp#L3258-L3259
https://github.com/godotengine/godot/blob/cf603aae8b7de7dd91066003b9898a97373eeed8/drivers/unix/os_unix.cpp#L140-L143
This also removes the unused block argument, which is always true.
Is there a way we could increase this without side effects? cc @bruvzg

I've noticed that stdin length is limited to 1024 bytes:

I guess we can call read in a loop and add to String, like
	char buff[1024];
	String ret;
	while (fgets(buf, 1024, stdin) != nullptr) {
		ret += buf;
	}
	return ret;

Also, will need https://github.com/godotengine/godot/pull/70389 backported for Unicode support.

Thanks!


Auto-handle phone number format by stripping any parentheses/dashes on submit - Reported by @thesahindia

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Open app
Navigate to Settings > Workspace > Connect bank account
Proceed with VBA flow to Company information page
Enter phone number in different formats (e.g with/without parentheses/dashes)

Expected Result:
User should be able to enter phone number in any format
Actual Result:
The phone number placeholder suggests that the input should be in this format (xxx)xxx-xxxx however, it will throw an error if we do that. So, either the placeholder should be updated or the input should be handled accordingly.
Workaround:
Unknown
Platform:

Where is this issue occurring?

Web
iOS
Android
Desktop App
Mobile Web

Version Number: 1.1.24-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/43995119/148008018-4a6b6ec5-cdbb-4d2a-92d8-0287b82abc99.mov
Expensify/Expensify Issue URL:
Issue reported by: @thesahindia
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1640355502103900
View all open jobs on GitHub

Triggered auto assignment to @puneetlath (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Triggered auto assignment to @puneetlath (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Proposal
using the below function, we can remove the special characters from the phone number and avoid the error that we are getting right now
    stripSpecialCharacters(number) {
        return number.replace(CONST.REGEX.NUMBERS_WITHOUT_SPECIAL_CHARS, '');
    }

the submit function will look like this -
submit() {
     if (!this.validate()) {
         BankAccounts.showBankAccountErrorModal();
         return;
     }

     const incorporationDate = moment(this.state.incorporationDate).format(CONST.DATE.MOMENT_FORMAT_STRING);
     const companyPhone = this.stripSpecialCharacters(this.state.companyPhone);
     BankAccounts.setupWithdrawalAccount({...this.state, incorporationDate, companyPhone});
 }

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)

Current assignee @puneetlath is eligible for the Exported assigner, not assigning anyone new.

Upwork job is here: https://www.upwork.com/jobs/~01e285df2aaa09959a

@thesahindia Where will you do these changes?

@thesahindia Where will you do these changes?

Sorry, forgot to add that!
This is the file I'm referring : https://github.com/Expensify/App/blob/main/src/pages/ReimbursementAccount/CompanyStep.js

Ok, Thanks for linking. I think we should update all of over phone input to behave the same. So Could you please list down the places where we have a phone input and create a component for phone input and use it in all places?
let me know if you have any questions.

@thesahindia I'm interested in this regex NUMBERS_WITHOUT_SPECIAL_CHARS, could you please comment it here?
Asking because you're sending it to the API, and it may not work for numbers with an extension. (Seen phone extensions mentioned in #7067 )
cc: @parasharrajat

@rushatgabhane, sure.
NUMBERS_WITHOUT_SPECIAL_CHARS: /[^0-9.]/g

These are the places where we have a phone input -

RequestCallPage
AdditionalDetailsStep
CompanyStep
AddSecondaryLoginPage

cc: @parasharrajat

Thanks for sharing @thesahindia. Could you please share a proposal on how are you planning to solve this issue?

@parasharrajat

So Could you please list down the places where we have a phone input and create a component for phone input and use it in all places?

I had one question regarding this request.
Since, we are only stripping or ignoring the value from the phone input just before submitting the form.
And the phone input will still have the same value as it is [eg :<PHONE_NUMBER> ] .. No change is being made.
So, how is creating another component for phone Input will help since the functionality remains the same.
I think to have the same behaviour, we would need to update the submit function in other places as well.
Also, the placeholder in other places would need to be changed.

submit() {
     if (!this.validate()) {
         BankAccounts.showBankAccountErrorModal();
         return;
     }

     const incorporationDate = moment(this.state.incorporationDate).format(CONST.DATE.MOMENT_FORMAT_STRING);
     const companyPhone = this.stripSpecialCharacters(this.state.companyPhone);
     BankAccounts.setupWithdrawalAccount({...this.state, incorporationDate, companyPhone});
 }

Yeah, the plan was to keep the same phone input format for all the places, same validations, and format, etc.
One way of doing this would be:

Create a PhoneInput component that does the following:
a) Allow the user to type the phone with braces and other special chars.
b) sets the parent component's state with only the phone number and no special chars.
c) sets the parent component's state with an error if any.

Let's ask @puneetlath if we want to do that. Currently, I see we have validations and Striping logic in each of these components for phone input. I see a possible opportunity to dry this up and avoid errors like this issue in the future.
@puneetlath  What do you say?

I think it's a good idea. I like it.

@thesahindia Waiting for your updated proposal...

@parasharrajat, I will create a PhoneTextInput component and will have another function similar to onChangeText which will provide the  formatted value ..since we need the regular onChangeText to let the user write special characters as well. And all errors and other functionality will just be the same as regular TextInput comp.
onChangeFormattedText={formattedPhoneNumber => this.setState({formattedPhoneNumber})}

Could you please lay down the outline of logic that would be contained in the component and the clean up you would do from the places, it will be used.

Sure, here's what I'm thinking
Will create these three files for PhoneTextInput :
src/components/PhoneTextInput/index.js
import React, {forwardRef} from 'react';
import styles from '../../styles/styles';
import * as baseTextPhoneInputPropTypes from './baseTextPhoneInputPropTypes';
import BaseTextPhoneInput from './BaseTextPhoneInput';

const PhoneTextInput = forwardRef((props, ref) => (
    <BaseTextPhoneInput
        // eslint-disable-next-line react/jsx-props-no-spreading
        {...props}
        innerRef={ref}
        inputStyle={[styles.baseTextInput, styles.textInputDesktop]}
    />
));

PhoneTextInput.propTypes = baseTextPhoneInputPropTypes.propTypes;
PhoneTextInput.defaultProps = baseTextPhoneInputPropTypes.defaultProps;
PhoneTextInput.displayName = 'PhoneTextInput';

export default PhoneTextInput;

src/components/PhoneTextInput/BasePhoneTextInput.js
import _ from 'underscore';
import React, {Component} from 'react';
import {
    Animated, View, TouchableWithoutFeedback,
} from 'react-native';
import Str from 'expensify-common/lib/str';
import TextInputLabel from '../TextInput/TextInputLabel';
import themeColors from '../../styles/themes/default';
import styles from '../../styles/styles';
import InlineErrorText from '../InlineErrorText';
import * as styleConst from '../TextInput/styleConst';
import TextInputWithName from '../TextInputWithName';
import CONST from '../../CONST';
import * as basePhoneTextnputPropTypes from './basePhoneTextInputPropTypes';

class BasePhoneTextInput extends Component {
    constructor(props) {
        super(props);

        this.value = props.value || props.defaultValue || '';
        this.formattedValue = this.stripSpecialCharacters(props.value || props.defaultValue || '');
        const activeLabel = props.forceActiveLabel || this.value.length > 0;

        this.state = {
            isFocused: false,
            labelTranslateY: new Animated.Value(activeLabel ? styleConst.ACTIVE_LABEL_TRANSLATE_Y : styleConst.INACTIVE_LABEL_TRANSLATE_Y),
            labelScale: new Animated.Value(activeLabel ? styleConst.ACTIVE_LABEL_SCALE : styleConst.INACTIVE_LABEL_SCALE),
        };

        this.input = null;
        this.isLabelActive = activeLabel;
        this.onPress = this.onPress.bind(this);
        this.onFocus = this.onFocus.bind(this);
        this.onBlur = this.onBlur.bind(this);
        this.setValue = this.setValue.bind(this);
    }

    componentDidMount() {
        // We are manually managing focus to prevent this issue: https://github.com/Expensify/App/issues/4514
        if (!this.props.autoFocus || !this.input) {
            return;
        }

        this.input.focus();
    }

    componentDidUpdate(prevProps) {
        // activate or deactivate the label when value is changed programmatically from outside
        if (prevProps.value === this.props.value) {
            return;
        }

        this.value = this.props.value;
        this.formattedValue = this.props.value;
        if (this.props.value) {
            this.activateLabel();
        } else if (!this.state.isFocused) {
            this.deactivateLabel();
        }
    }

    onPress(event) {
        if (this.props.disabled) {
            return;
        }

        if (this.props.onPress) {
            this.props.onPress(event);
        }

        if (!event.isDefaultPrevented()) {
            this.input.focus();
        }
    }

    onFocus(event) {
        if (this.props.onFocus) { this.props.onFocus(event); }
        this.setState({isFocused: true});
        this.activateLabel();
    }

    onBlur(event) {
        if (this.props.onBlur) { this.props.onBlur(event); }
        this.setState({isFocused: false});
        this.deactivateLabel();
    }

    /**
     * Set Value & activateLabel
     *
     * @param {String} value
     * @memberof BasePhoneTextInput
     */
    setValue(value) {
        this.value = value;
        this.formattedValue = LoginUtil.getPhoneNumberWithoutSpecialChars(value);
        Str.result(this.props.onChangeFormattedText, this.formattedValue);
        Str.result(this.props.onChangeText, value);
        this.activateLabel();
    }

    activateLabel() {
        if (this.value.length < 0 || this.isLabelActive) {
            return;
        }

        this.animateLabel(
            styleConst.ACTIVE_LABEL_TRANSLATE_Y,
            styleConst.ACTIVE_LABEL_SCALE,
        );
        this.isLabelActive = true;
    }

    deactivateLabel() {
        if (this.props.forceActiveLabel || this.value.length !== 0) {
            return;
        }

        this.animateLabel(styleConst.INACTIVE_LABEL_TRANSLATE_Y, styleConst.INACTIVE_LABEL_SCALE);
        this.isLabelActive = false;
    }

    animateLabel(translateY, scale) {
        Animated.parallel([
            Animated.spring(this.state.labelTranslateY, {
                toValue: translateY,
                duration: 80,
                useNativeDriver: true,
            }),
            Animated.spring(this.state.labelScale, {
                toValue: scale,
                duration: 80,
                useNativeDriver: true,
            }),
        ]).start();
    }

    render() {
        // eslint-disable-next-line react/forbid-foreign-prop-types
        const inputProps = _.omit(this.props, _.keys(basePhoneTextnputPropTypes.propTypes));
        const hasLabel = Boolean(this.props.label.length);
        return (
            <View>
                <View
                    style={[
                        !this.props.multiline && styles.componentHeightLarge,
                        ...this.props.containerStyles,
                    ]}
                >
                    <TouchableWithoutFeedback onPress={this.onPress} focusable={false}>
                        <View
                            style={[
                                styles.textInputContainer,
                                this.state.isFocused && styles.borderColorFocus,
                                (this.props.hasError || this.props.errorText) && styles.borderColorDanger,
                            ]}
                        >
                            {hasLabel ? (
                                <>
                                    {/* Adding this background to the label only for multiline text input,
                                    to prevent text overlapping with label when scrolling */}
                                    {this.props.multiline && <View style={styles.textInputLabelBackground} pointerEvents="none" />}
                                    <TextInputLabel
                                        label={this.props.label}
                                        labelTranslateY={this.state.labelTranslateY}
                                        labelScale={this.state.labelScale}
                                        for={this.props.nativeID}
                                    />
                                </>
                            ) : null}
                            <View style={[styles.textInputAndIconContainer]}>
                                <TextInputWithName
                                    ref={(ref) => {
                                        if (typeof this.props.innerRef === 'function') { this.props.innerRef(ref); }
                                        this.input = ref;
                                    }}
                                    // eslint-disable-next-line
                                    {...inputProps}
                                    value={this.value}
                                    placeholder={(this.state.isFocused || !this.props.label) ? this.props.placeholder : null}
                                    placeholderTextColor={themeColors.placeholderText}
                                    underlineColorAndroid="transparent"
                                    style={[this.props.inputStyle, styles.flex1, styles.w100, !hasLabel && styles.pv0]}
                                    multiline={this.props.multiline}
                                    onFocus={this.onFocus}
                                    onBlur={this.onBlur}
                                    onChangeText={this.setValue}
                                    onPressOut={this.props.onPress}
                                    name={this.props.name}
                                />
                            </View>
                        </View>
                    </TouchableWithoutFeedback>
                </View>
                {!_.isEmpty(this.props.errorText) && (
                    <InlineErrorText>
                        {this.props.errorText}
                    </InlineErrorText>
                )}
            </View>
        );
    }
}

BasePhoneTextInput.propTypes = basePhoneTextnputPropTypes.propTypes;
BasePhoneTextInput.defaultProps = basePhoneTextnputPropTypes.defaultProps;

export default BasePhoneTextInput;

src/components/PhoneTextInput/basePhoneTextInputPropTypes.js
import PropTypes from 'prop-types';

const propTypes = {
    /** Input label */
    label: PropTypes.string,

    /** Name attribute for the input */
    name: PropTypes.string,

    /** Input value */
    value: PropTypes.string,

    /** Default value - used for non controlled inputs */
    defaultValue: PropTypes.string,

    /** Input value placeholder */
    placeholder: PropTypes.string,

    /** Error text to display */
    errorText: PropTypes.string,

    /** Should the input be styled for errors  */
    hasError: PropTypes.bool,

    /** Customize the TextInput container */
    containerStyles: PropTypes.arrayOf(PropTypes.object),

    /** input style */
    inputStyle: PropTypes.arrayOf(PropTypes.object),

    /** If present, this prop forces the label to remain in a position where it will not collide with input text */
    forceActiveLabel: PropTypes.bool,

    /** Should the input auto focus? */
    autoFocus: PropTypes.bool,
};

const defaultProps = {
    label: '',
    name: '',
    errorText: '',
    placeholder: '',
    hasError: false,
    containerStyles: [],
    inputStyle: [],
    autoFocus: false,

    /**
     * To be able to function as either controlled or uncontrolled component we should not
     * assign a default prop value for `value` or `defaultValue` props
     */
    value: undefined,
    defaultValue: undefined,
    forceActiveLabel: false,
};

export {propTypes, defaultProps};

Use
for RequestCallPage.js

add formattedPhoneNumber: null  after line 92
https://github.com/Expensify/App/blob/ca085ae41de731893bf6c99cfd3401533ef1196e/src/pages/RequestCallPage.js#L90-L94

On line 143 I will remove LoginUtil.getPhoneNumberWithoutSpecialChars and will pass formattedPhoneNumber https://github.com/Expensify/App/blob/ca085ae41de731893bf6c99cfd3401533ef1196e/src/pages/RequestCallPage.js#L138-L144

Same as 2 for line 165 https://github.com/Expensify/App/blob/ca085ae41de731893bf6c99cfd3401533ef1196e/src/pages/RequestCallPage.js#L164-L169

Will replace TextInput with PhoneTextInput and I will add onChangeFormattedText={formattedPhoneNumber => this.setState({formattedPhoneNumber})} https://github.com/Expensify/App/blob/ca085ae41de731893bf6c99cfd3401533ef1196e/src/pages/RequestCallPage.js#L305-L314

will do the similar changes for other pages as well

Hmm, I see. But you are not utilizing composition instead duplicate a lot of code.
Here is the outline.

we should create a PhoneTextInput component.
That wraps TextInput component.
This component's only duty would be to maintain state value and call onChangeText from props.
OnChangeText, it should remove the special chars and return the value.

let me know if you have any questions. Otherwise, if you are to follow the above steps what is going to be your proposal now.

Have one question regarding the 4th point, if we return the formatted value then the user will not be able to write the number in (xxx)xxx-xxxx form since it will always go back to numbers only format on each change.
I thought we wanted 2 values, one is for user to allow the use of special chars and other one to use it when we submit the form

Yeah, you are correct. That's why we will create a local state in the component that will preserve user input.

@parasharrajat,
updated proposal
import React from 'react';
import Str from 'expensify-common/lib/str';
import * as phoneTextnputPropTypes from './phoneTextnputPropTypes';
import TextInput from '../TextInput';
import LoginUtil from '../../libs/LoginUtil';

class PhoneTextInput extends React.Component {
    constructor(props) {
        super(props);

        this.value = props.value || props.defaultValue || '';
        this.setValue = this.setValue.bind(this);
    }

    setValue(val) {
        this.value = val;
        const formattedValue = LoginUtil.getPhoneNumberWithoutSpecialChars(val);
        Str.result(this.props.onChangeText, formattedValue);
    }

    render() {
        return (
            <TextInput
                ref={el => this.textInput = el}
                // eslint-disable-next-line react/jsx-props-no-spreading
                {...this.props}
                value={this.value}
                onChangeText={this.setValue}

            />
        );
    }
}

PhoneTextInput.propTypes = phoneTextnputPropTypes.propTypes;
PhoneTextInput.defaultProps = phoneTextnputPropTypes.defaultProps;

export default React.forwardRef((props, ref) => (
    /* eslint-disable-next-line react/jsx-props-no-spreading */
    <PhoneTextInput {...props} forwardedRef={ref} />
));

Ok, sounds good. That will work.
@thesahindia 's proposal looks good.
cc: @puneetlath
:ribbon: :eyes: :ribbon:  C+ reviewed

📣 @thesahindia You have been assigned to this job by @puneetlath!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖

Sounds good to me too. @thesahindia I sent you a hiring offer in Upwork.

How is this issue going?

@puneetlath, made all the required changes just need a review now.

Great! Just comment on the PR asking for a re-review.

Review is ongoing.

Not overdue. PR ongoing.

Triggered auto assignment to @kadiealexander (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Current assignee @parasharrajat is eligible for the Exported assigner, not assigning anyone new.

Triggered auto assignment to @marcaaron (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@kadiealexander @marcaaron I'm handing this over to y'all since I'm going on my two month sabbatical now.
@marcaaron I've assigned you to the PR as well.
@kadiealexander Contract for the fix: https://www.upwork.com/ab/c/8577561/contracts/29255931#milestones%2F20220203%2F20220304
Looks like there isn't a C+ contract so we'll need to create that as well.

@parasharrajat could you please apply to this job so I can ensure you're paid as C+ for this issue?
https://www.upwork.com/jobs/~014e81c4ea89fec588

There is a function I would use to remove the ( ) and  -
accept my proposal on upwork to continue

@kelvinkaicheung before we accept on Upwork we will need to review a detailed proposal from you for how this would be fixed, including the functions used, and decide that your proposal is best suited. Please update your proposal to include this detail and the team will review this for you and determine whether this is a suitable fix.

@kadiealexander Help Wanted label is accidental here. It got added on reapplying Exported label. This issue is no more open for proposals. Thanks.

There is not much further I can say. Accept my help on upwork and I will start fixing this small bug.

Any update @thesahindia on the PR?

I have asked some questions related to the PR, can you share your views on it. Here's the slack thread
cc: @marcaaron

Hmm sorry, what's your question exactly @thesahindia ?

We have changed the error message for invalid phone number at some places and  AddSecondaryLoginPage.js is left. It shows the error from the backend and I think we don't really need to change the error message here as the error message is fine on this one. It says: I couldn't validate the phone number, please try again with the country code (e.g. +15005550006) so should I leave this one?

We have changed the placeholder for all the phone number inputs but on Add Phone number page we don't have one, so should I add one there?

Please ignore the above, I updated the wrong issue.

@thesahindia Bump..

@parasharrajat, PR is ready just need to resolve some conflicts.

We have changed the error message for invalid phone number at some places and  AddSecondaryLoginPage.js is left. It shows the error from the backend and I think we don't really need to change the error message here as the error message is fine on this one. It says: I couldn't validate the phone number, please try again with the country code (e.g. +15005550006) so should I leave this one?

I was just waiting for the decision on this.
@marcaaron, do we wanna change the error message here?

Sorry, I don't understand the question or what exactly you need help with. Can you ask it another way or provide more detail? Maybe asking publicly in the Slack channel will help us get unblocked.

Linking to examples in the code when asking your question will probably help me get what you need confirmation on...

For invalid phone number we were showing this error: Please enter a valid phone number without brackets or dashes. If you're outside the US please include your country code, eg. +447782339811
But now the user can enter brackets and dashes in the phone number so we have removed this line: Please enter a valid phone number without brackets or dashes.
And at Add phone number page we show a different error:  I couldn't validate the phone number, please try again with the country code (e.g. +15005550006) which is from backend. So, I am asking do we wanna use the same error message that we are using at some other places for consistency  or can we leave this one as the error message is correct and doesn't need any change.
@marcaaron, just need a small confirmation about the error message here.

I don't know the answer sorry, this would be best to ask marketing or in the open source channel.

Posted in #expensify-open-source here to get consensus.

@thesahindia, please proceed with the same error message as other places in the product:

I couldn't validate the phone number, please try again with the country code (e.g. +15005550006)

Thanks!!

@parasharrajat would you mind reviewing @thesahindia's PR here? https://github.com/Expensify/App/pull/7328

On my list. Coming back to it. There was a long delay for requested changes which shifted the priority for this PR.

@kadiealexander, I have asked some questions on slack but didn't get much 👀. Can you help? Here's the thread.

@thesahindia I see that @luacmartins has responded since you asked this, are you still needing further help?

Nope, it's good now, got the answer.

What's the latest here?

@luacmartins suggested that instead of using a new component we should be stripping parentheses and dashes at validation and on form submission.

I'm not sure that I agree 100% with creating yet another component for this. I'd think that we should strip special chars for frontend validation and on form submission.

So we are thinking to do the same. Can you share you thoughts?

bump @marcaaron ⬆

I agree with @luacmartins and don't understand the benefits of having an input component that does this for us.

Yeah I agree on this, I will update the PR and will remove the new component.

I have closed the previous PR ( needed to revert too many changes )
I have raised a new one https://github.com/Expensify/App/pull/8845

Thanks for the update @thesahindia!

Going OOO for a week and will need to re-assign this.

I'm adding some labels that never got applied.

@kadiealexander, total compensation for this job is $750. $500 for the fix and $250 as the reporting bonus.

@thesahindia yes, sorry about that I was just confirming the price change with our team. I've issued the remaining $250 and closed the contract.
@parasharrajat has now also been paid.