Together with @sentry/nextjs this will break production builds

See https://github.com/getsentry/sentry-javascript/issues/5906
Sentry expects the getInitialProps function to return { pageProps: unknown} to set something on pageProps.
Currently this HOC, will return {initialProps: {pageProps: unknown }, ...}.
Which will cause Sentry to run into an runtime type error.
Our current workaround is:
// _app.ts

function MyApp({ Component, pageProps }) {
  return <Component {...pageProps} />
}

MyApp.getInitialProps = async (appContext: AppContext) =>
	App.getInitialProps(appContext)

const WithDarkApp = withDarkMode(MyApp)
const oldInitialProps = WithDarkApp.getInitialProps

// This fixes, that sentry expects there to be no extra `initialProps` field, and instead directly expects the `pageProps` field
WithDarkApp.getInitialProps = async (appContext: AppContext) => {
	const initialProps = await oldInitialProps(appContext)
	return {
		...initialProps?.initialProps,
		...initialProps,
	}
}

export default WithDarkApp

I think ideally this should be fixed in the library directly, but it could theoretically break some apps, if they rely on this current behavior.
If desired, I might be able to come up with a fix myself (if my time permits 😓), but wanted to gauge feedback first.

Hi, @reckter thanks for reporting this!
I have pushed a beta version 4.0.0-beta.0 with the changes that you requested.
Try that out and let me know if it solves your issue with Sentry :)

@xeoneux Hi, Sentry SDK maintainer here. Thank you for taking a look at this!
I am not entirely sure whether your fix will work since your wrapper still doesn't return { pageProps: unknown } when the user hasn't defined a getInitialProps in his _app.
The problematic line is: https://github.com/xeoneux/next-dark-mode/blob/ca4ac4a6d373425f81158643cade8cc89e58ddd7/src/index.tsx#L106
The Next.js docs state that if you have a getInitialProps in your _app, you must call App.getInitialProps(appContext) and merge the result.
In the case of your wrapper, you are setting getInitialProps for the user if it is not there, so you must also always call import("next/app").getInitialProps(appContext) for them.
I propose the following change:
- const appProps = App.getInitialProps ? await App.getInitialProps(appContext) : {}
+ import NextApp from "next/app"
+ const appProps = App.getInitialProps ? await App.getInitialProps(appContext) : await NextApp.getInitialProps(appContext)

We should probably also be a bit more defensive in what data types we assert in the SDK but I still recommend you go through with this change just to be in line with the Next.js docs.

Ah, that makes sense, thanks for the explanation @lforst! I have updated the lib with the change 👍

Tested with 4.0.0-beta.1, and that seems to fix it! 👍
(Sidenode: I had to revert our repository to the original dependencies versions, maybe sentry actually put in a workaround at their end?)


Support for older Django versions

This is not a feature but rather a question. I personally really like this package and at work, we would like to use it in a project that is running on a quite old Django version (1.4). Please do not hate me for this question, I am already punished enough :cry:
What were the reasons support for older Django versions was dropped? Are there any real incompatibilities and is there a real blocker that prevents this app from being forked by me and made compatible with Django 1.4 while we still use this version?

Hi @nick-lehmann, and sorry for the delay. Supporting old versions of software requires more effort and resources, and is sometimes impossible. Since this project is maintained on a best effort basis, on my (and other contributors) free time, we cannot reasonnably support Django versions that are 6 or 7 years old (1.4 may be even older than that).
To be honest, I don't even remember if django 1.4 was still a thing when I started this package in 2014. I think the older version is worked with was django 1.7.

Please do not hate me for this question, I am already punished enough

I understand that, however, at this point, I really thing your best course of action is to upgrade to newer version of Django :/ I don't think you'll find many (if any) maintained package that will work on Django 1.4
I wish you luck with your project anyway, I know you cannot always do as you'd like too, especially with legacy projects
Take care

@EliotBerriot I totally understand your point. If not for my employer, I also wouldn't care about Django versions this old. Especially because the changes from 1.4 to 1.8 are quite huge.

I really think your best course of action is to upgrade to newer version of Django

You are so right. Your package was so promising and covers our use case completely. However, when we upgrade is not up to me :/ Seems like even the drop of python 2 did not cause enough pressure to upgrade..
Still very nice package. Keep up the good work 👍


National format changes default number

When trying to format this number +3461211111111111119, it returns this:
{  "country_code":34,  "national_number":61211111111111120,  "raw_input":"+3461211111111111119",  "country_code_source":1 }
And the number is changed (last digits 19 transforms into 20). Similar when trying to format +3461211111111111111, +37529111111111111111, +37529666666666666666 and so on.

@ayaskevich,
Thank you for using libphonenumber!
This is actually working as intended; when +3461211111111111119 is given as input it returns national_number:<PHONE_NUMBER>1111119 correctly. The last digits are not transforming. To check the latest behavior for yourself, see the demo(instructions in our contribution guidelines).

@kkeshava oh, I forgot to mention that it was in js lib, this demo

Thank you for taking the time to improve libphonenumber!
This issue is a duplicate of #1474. Closing this issue.


revert dropping of noqa

Missed this failure in #783.

My editor with ruff installed from the pyproject.toml and the pre-commit didn't complain. Are you sure you don't have an outdated version of ruff?
If you're sure then I don't know why it is a problem on your side and not mine. It is curious but if you want to merge I have nothing against it.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (aba8807) 95.55% compared to head (9409f9f) 95.55%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #784   +/-   ##
=======================================
  Coverage   95.55%   95.55%
=======================================
  Files          55       55
  Lines        3532     3532
  Branches      314      314
=======================================
  Hits         3375     3375
  Misses        110      110
  Partials       47       47

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

The failure comes from CI, not local, so we would need to check the ruff version there.

The version in the pre-commit does fail:
https://github.com/iterative/dvclive/blob/b0a88a76d3ecb254a0f332aff7f5af9a29c5376d/.pre-commit-config.yaml#L31-L36
$ pre-commit run --show-diff-on-failure --color=always --all-files
check for added large files..............................................Passed
check for case conflicts.................................................Passed
check docstring is first.................................................Passed
check that executables have shebangs.................(no files to check)Skipped
check json...............................................................Passed
check for merge conflicts................................................Passed
check toml...............................................................Passed
check yaml...............................................................Passed
debug statements (python)................................................Passed
fix end of files.........................................................Passed
mixed line ending........................................................Passed
sort simple yaml files...............................(no files to check)Skipped
trim trailing whitespace.................................................Passed
codespell................................................................Passed
ruff.....................................................................Failed
- hook id: ruff
- exit code: 1

src/dvclive/live.py:341:9: A003 Class attribute `dir` is shadowing a Python builtin
Found 1 error.

ruff-format..............................................................Passed
Pretty format TOML.......................................................Passed
Pretty format YAML.......................................................Passed

Although the version from the py-template is 0.1.13 which reports the opposite:
$ ruff check src/dvclive/live.py
src/dvclive/live.py:341:28: RUF100 [*] Unused `noqa` directive (unused: `A003`)
Found 1 error.

So maybe we are better off updating the ruff version?

https://github.com/iterative/dvclive/pull/786


JoinPool gas test

Description

This PR includes adding gas test for join pool in the gamm module, with the recent notice of gas increase for JoinPool - aiming to prevent further increase of gas in the JoinPool logic.

For contributor use:

[ ] Targeted PR against correct branch (see CONTRIBUTING.md)
[ ] Updated relevant documentation (docs/) or specification (x/<module>/spec/)
[ ] Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
[ ] Re-reviewed Files changed in the Github PR explorer

Codecov Report

Merging #586 (88f4729) into main (2a240fa) will decrease coverage by 0.54%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #586      +/-   ##
==========================================
- Coverage   20.72%   20.17%   -0.55%
==========================================
  Files         172      172
  Lines       23465    24122     +657
==========================================
+ Hits         4863     4867       +4
- Misses      17812    18465     +653
  Partials      790      790

Impacted Files
Coverage Δ

x/pool-incentives/keeper/grpc_query.go
68.18% <0.00%> (-25.57%)
:arrow_down:

x/incentives/keeper/grpc_query.go
55.29% <0.00%> (-9.79%)
:arrow_down:

x/pool-incentives/keeper/keeper.go
87.09% <0.00%> (-2.91%)
:arrow_down:

x/pool-incentives/types/query.pb.go
15.00% <0.00%> (-2.04%)
:arrow_down:

x/incentives/keeper/gauge.go
66.79% <0.00%> (-1.27%)
:arrow_down:

x/incentives/types/query.pb.go
0.83% <0.00%> (-0.03%)
:arrow_down:

x/lockup/keeper/grpc_query.go
75.30% <0.00%> (ø)

x/incentives/client/cli/query.go
0.00% <0.00%> (ø)

x/incentives/types/query.pb.gw.go
0.00% <0.00%> (ø)

x/pool-incentives/client/cli/query.go
0.00% <0.00%> (ø)

... and 1 more

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 2a240fa...88f4729. Read the comment docs.

Thanks! Can we also have a test for it where we create a new pool & new denom for every test. Thats the main thing we want to ensure doesn't grow in the new update code.

We can also merge this, and do that second test in a later PR if you're working on other things.

Nope! It's fine! Currently working on this, planning to push it within today


Development Plan

Unassigned

[x] #2

[ ] #4

Claimed

[ ] #3

Please comment what issue you can work on to claim it

imma go with #2 ;]


[FEATURE] addon-doc Long menu items

🚀 Feature request
Is your feature request related to a problem?
Long menu items don't fit in the side-menu
Describe the solution you'd like
Perhaps we should show each menu item in one line with elipsis, or make it customizable
Additional context

To implement this feature all we have to do is to introduce the "max-width": 100% property in the tuiLink component and add these styles to the content block
white-space: nowrap;
text-overflow: ellipsis;
width: 100%;
overflow: hidden;
vertical-align: top;

Let me know if that makes sense to you so I can go ahead and introduce this changes.

Can you add max-width inplace too, not on every tuiLink? I'd like to build in as little styles as possible in those low level components.


Fixes #151

Fixes #151 (Update the status of existing issues on contrihub-21 site when populating issues.)
Added a if/else statement to update the status of issues on the website based on Github status.

Added a line state=state, in creating a new issue on contrihub website from the fetched issues from GitHub to make the same state(status) that is on Github.


opennebula-exporter not updating the VMs status in pending state

Description
If a VM enter in pending state, the opennebula-exporter will provide to prometheus this info and the dashboard opennebula.json will show in one of its panels, that there is a VM in pending state. The problem is that is not updating this info, even after the VM changed to another state, like running.
To Reproduce
Somehow if the VM is created and stay in pending state.
On the orchestrator leader:
curl -s http://localhost:9925/metrics | grep opennebula_vm_state
# TYPE opennebula_vm_state gauge
# HELP opennebula_vm_state VM state 0:init 1:pending 2:hold 3:active 4:stopped 5:suspended 6:done 8:poweroff 9:undeployed 10:clonning
opennebula_vm_state{one_vm_id="0",one_host_id="-1"} 1.0
opennebula_vm_state{one_vm_id="1",one_host_id="-1"} 1.0
opennebula_vm_state{one_vm_id="1",one_host_id="0"} 9.0

As you can see, there are two VMs in pending state that doesnt belong to any host (the host id is -1).
These are the VMs of the cluster:
 onevm list

  ID USER     GROUP    NAME                                                                                STAT  CPU     MEM HOST                                                                 TIME
   1 oneadmin oneadmin test-grafana                                                                                runn 0.25      8G hv-dev-n1-kvm                                                    0d 05h11

Expected behavior
The opennebula-exporter provide the expected info to the prometheus.
Details

Affected Component: [Monitoring]
Hypervisor: [KVM]
Version: [6.6.2]

Additional context
Add any other context about the problem here.

Progress Status

[ ] Code committed
[ ] Testing - QA
[ ] Documentation (Release notes - resolved issues, compatibility, known issues)

Hi @Franco-Sparrow !
Thank you so much for reporting this. You're of course correct.
The problem is actually that we used 2 labels in the VM collector and that causes a memory leak (kind of) in the https://github.com/prometheus/client_ruby/blob/main/lib/prometheus/client/registry.rb.
After some investigation we decided to simplify it and removed one_host_id label, then introduced additional gauge with the same intention.
This fix will be packaged in the next release I believe, but for the time being you can (if you like) grab this patch:
diff --git a/src/oneprometheus/opennebula-exporter/src/opennebula_vm_collector.rb b/src/oneprometheus/opennebula-exporter/src/opennebula_vm_collector.rb
index 71df99c..a801e19 100644
--- a/src/oneprometheus/opennebula-exporter/src/opennebula_vm_collector.rb
+++ b/src/oneprometheus/opennebula-exporter/src/opennebula_vm_collector.rb
@@ -18,7 +18,7 @@ require 'opennebula'

 class OpenNebulaVMCollector

-    LABELS = %i[one_vm_id one_host_id]
+    LABELS = %i[one_vm_id]

     # --------------------------------------------------------------------------
     # VM metrics
@@ -39,6 +39,20 @@ class OpenNebulaVMCollector
             :docstr => 'Total number of VMs defined in OpenNebula',
             :labels => {}
         },
+        'vm_host_id' => {
+            :type   => :gauge,
+            :docstr => 'Host ID where the VM is allocated',
+            :value  => ->(v) {
+                hid = v['HISTORY_RECORDS/HISTORY/HID']
+
+                if !hid || hid.empty?
+                    -1
+                else
+                    Integer(hid)
+                end
+            },
+            :labels => LABELS
+        },
         'vm_state' => {
             :type   => :gauge,
             :docstr => 'VM state 0:init 1:pending 2:hold 3:active ' \
@@ -71,7 +85,7 @@ class OpenNebulaVMCollector
             :value  => ->(v) {
                 vcpus = v['TEMPLATE/VCPU']

-                if !vcpus || vcpus.empty
+                if !vcpus || vcpus.empty?
                     1
                 else
                     Integer(vcpus)
@@ -130,14 +144,6 @@ class OpenNebulaVMCollector
         vms.each do |vm|
             labels = { :one_vm_id => Integer(vm['ID']) }

-            host_id = vm['HISTORY_RECORDS/HISTORY/HID']
-
-            if host_id && !host_id.empty?
-                labels[:one_host_id] = host_id
-            else
-                labels[:one_host_id] = '-1'
-            end
-
             VM_METRICS.each do |name, conf|
                 next unless conf[:value]

We cannot share links to that git repo unfortunately, please accept the patch :hugs: :pray:.

Also this issue is partially related to #6236


Robust statistics for outliers removal, averaging and smoothing

See for example:
Łęski, Jacek M. "Robust weighted averaging [of biomedical signals]." Biomedical Engineering, IEEE Transactions on 49.8 (2002): 796-804.
http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1019443&punumber=10&url=http%3A%2F%2Fieeexplore.ieee.org%2Fiel5%2F10%2F21925%2F01019443.pdf%3Ftp%3D%26arnumber%3D1019443%26punumber%3D10

Some work on outliers removal has been done in msct_nurbs. I close this issue but it can been useful for reference.


Tailwind Instructions?

I realize this may be out of scope for the library, but I'm trying to set up Tailwind to work with Solid-JS and not sure how to go about it.
Since solid-scripts seems to be based on react-scripts, I tried to mostly follow the Tailwind React instructions and use Craco to configure it as a PostCSS plugin. That didn't work, since Craco v6 complains that create-react-app is too old and Craco v5.8 complains that it Cannot find ESLint loader (eslint-loader) despite setting eslint { enable: false } in the Craco config.
Adding @amoutonbrady since I saw them mention using both Tailwind and CSS in another issue.
Maybe there's a simple way I'm missing? Any help appreciated!

I don't have experience using solid-scripts, but I found success using https://github.com/amoutonbrady/solid-snowpack-starter. It worked for me out of the box :)

I don't have experience using solid-scripts, but I found success using https://github.com/amoutonbrady/solid-snowpack-starter. It worked for me out of the box :)

Hmm.. yeah I forked off Create React App May 2019. I am not terribly familiar with how it's changed since then. Mostly was just looking for an easy starter toolset. I can't say I've ever tried Craco, I'm not even sure if the way I changed it would be compatible. It is sort of an as-is experience mostly. I did recently update PostCSS so I assume there must be some play here, but I'm not sure. Have you tried manually adding es-lint loader to your project? Obviously it isn't in our webpack config, but Craco seems to be trying to do something with it. Outside of that I am not sure what I'd need to do for Craco to recognize it.
Generally if you want more configurability we are sort of left with ejecting or using one of the other starters, since as you can imagine there isn't a community around modding this. In all honesty at some point I hope to be able to provide a better easy startup environment, but this was one I knew to atleast have all the standard niceties even if it is not that configurable.

Hmm.. yeah I forked off Create React App May 2019. I am not terribly familiar with how it's changed since then. Mostly was just looking for an easy starter toolset. I can't say I've ever tried Craco, I'm not even sure if the way I changed it would be compatible. It is sort of an as-is experience mostly. I did recently update PostCSS so I assume there must be some play here, but I'm not sure. Have you tried manually adding es-lint loader to your project? Obviously it isn't in our webpack config, but Craco seems to be trying to do something with it. Outside of that I am not sure what I'd need to do for Craco to recognize it.
Generally if you want more configurability we are sort of left with ejecting or using one of the other starters, since as you can imagine there isn't a community around modding this. In all honesty at some point I hope to be able to provide a better easy startup environment, but this was one I knew to atleast have all the standard niceties even if it is not that configurable.

@rynansolid I'm using typescript, so I don't think ESLint makes sense, but also don't have much sense of what Craco or the starter scripts are doing. I can try adding ESLint as a dev dependency and see what happens. I think the main thing is figuring out how to allow the PostCSS config to be extended by the app, which really shouldn't depend on ESLint at all.
@parlough Thanks for the Snowpack starter link. I'll have to check that out. I see a tsconfig file, so hopefully that means it supports Typescript(?). This might be the easy path :)

@rynansolid I'm using typescript, so I don't think ESLint makes sense, but also don't have much sense of what Craco or the starter scripts are doing. I can try adding ESLint as a dev dependency and see what happens. I think the main thing is figuring out how to allow the PostCSS config to be extended by the app, which really shouldn't depend on ESLint at all.
@parlough Thanks for the Snowpack starter link. I'll have to check that out. I see a tsconfig file, so hopefully that means it supports Typescript(?). This might be the easy path :)

@rynansolid I'm using typescript, so I don't think ESLint makes sense, but also don't have much sense of what Craco or the starter scripts are doing. I can try adding ESLint as a dev dependency and see what happens. I think the main thing is figuring out how to allow the PostCSS config to be extended by the app, which really shouldn't depend on ESLint at all.
@parlough Thanks for the Snowpack starter link. I'll have to check that out. I see a tsconfig file, so hopefully that means it supports Typescript(?). This might be the easy path :)

@rynansolid I'm using typescript, so I don't think ESLint makes sense, but also don't have much sense of what Craco or the starter scripts are doing. I can try adding ESLint as a dev dependency and see what happens. I think the main thing is figuring out how to allow the PostCSS config to be extended by the app, which really shouldn't depend on ESLint at all.
@parlough Thanks for the Snowpack starter link. I'll have to check that out. I see a tsconfig file, so hopefully that means it supports Typescript(?). This might be the easy path :)

My understanding is TSLint is being deprecated and ESLint with TypeScript presets is the future but yeah. I think for custom configuration you are probably better off on a different path. We're still trying all the tools and trying to find the best core build setup. I'm still very much on basic Rollup setup (but I don't care about DX at all in my personal setups) but @amoutonbrady  has been trying a lot of stuff. I used the snowpack build a bit and it was good for dev, but I'm unclear on how the prod build is. To my knowledge it supports TS, so you should be good.

My understanding is TSLint is being deprecated and ESLint with TypeScript presets is the future but yeah. I think for custom configuration you are probably better off on a different path. We're still trying all the tools and trying to find the best core build setup. I'm still very much on basic Rollup setup (but I don't care about DX at all in my personal setups) but @amoutonbrady  has been trying a lot of stuff. I used the snowpack build a bit and it was good for dev, but I'm unclear on how the prod build is. To my knowledge it supports TS, so you should be good.

@thatcort, TSLint is depreacted for a while now, and ESLint only makes sense. https://medium.com/palantir/tslint-in-2019-1a144c2317a9

@thatcort, TSLint is depreacted for a while now, and ESLint only makes sense. https://medium.com/palantir/tslint-in-2019-1a144c2317a9

Thanks, @high1. I got things working using the Snowpack starter. I agree this is tangential to Solid, but webpack and create-react-app are outside my experience. I hope I'm not taking advantage of the community here by asking these questions.

Thanks, @high1. I got things working using the Snowpack starter. I agree this is tangential to Solid, but webpack and create-react-app are outside my experience. I hope I'm not taking advantage of the community here by asking these questions.

Nope, not at all IMO - the issue here is that the ecosystem is not nearly as vast as the other major ones, so a lot of questions don't have answers ready when you search... The starter uses CSS Modules with Tailwind, which I find problematic, because stylings are kept in two different places and I'm aiming to replace that with https://github.com/callstack/linaria - it should just work with Solid, because there's no runtime.

Nope, not at all IMO - the issue here is that the ecosystem is not nearly as vast as the other major ones, so a lot of questions don't have answers ready when you search... The starter uses CSS Modules with Tailwind, which I find problematic, because stylings are kept in two different places and I'm aiming to replace that with https://github.com/callstack/linaria - it should just work with Solid, because there's no runtime.

@thatcort consider this solution https://github.com/tw-in-js/twind

@thatcort consider this solution https://github.com/tw-in-js/twind

My personal preference is not to use CSS-in-JS with runtimes, because of the additional performance penalty - that's why the starter use PostCSS build step and will use Linaria.

My personal preference is not to use CSS-in-JS with runtimes, because of the additional performance penalty - that's why the starter use PostCSS build step and will use Linaria.

I think this has run it's course.. but good info shared. Thanks everyone.

I think this has run it's course.. but good info shared. Thanks everyone.


Run Django 2.x tests

While investigating the tests and stuff, I think we may have broken a behaviour that depended on the old middleware behaviour.
From the code:
We will purge a session that has expired. This middleware should be run
    before the LoginRequired middleware if you want to redirect the expired
    session to the login page (if required).

Because the session expiry middleware shortcircuits first, loginrequired middleware no longer gets called afterwards. Our app appears to behave the same way though, this might be because the page we are redirecting to triggers another processing of all the middlewares.

Done as part of #83


New wishes...

Wish we can add a .lnk exclude in the PowerToys Run, just like searching software in Windows search, because whenever I search for software, it also shows the link shortcut which takes an extra place for item display...

Tracked in https://github.com/microsoft/PowerToys/issues/5273 to disable the program plugin.


Send to Array of tokens

Hi is it possible to send to multiple tokens at once, most of the time the users are logging in from multiple devices ios, ipad, android and so on, I was wondering is it possible to send the notification to multiple tokens at once. Or on fcm.send(messages[]....)
The problem now is after sending the notification I am saving it to mongodb, but with that logic I have to create some kind of a promise to see when all of them are send then to save it to the database

Need this too.

https://firebase.google.com/docs/cloud-messaging/http-server-ref
Apparently this issue is at Firebase level, so not much we can do about it...
What we can do, however, is group all the tokens in an array and loop through it executing FCM.send() on every different token.

@pentarex after looking into it i can assume you can use the "registratoion_ids" JSON object key instead of the "to" key to send a multicast message to an array of tokens !
https://developers.google.com/cloud-messaging/http-server-ref This is GCM documentation but also works with FCM.
Can we close this?
:)

Using "registration_ids" instead of "to" works fine. I have tested it.
Its also mentioned in the firebase documentation. Its safe to assume that this issue can be closed.
https://firebase.google.com/docs/cloud-messaging/http-server-ref
Thank You

I thank you :)


(maint) merge 5.5.x branch to 6.4.x

CLA signed by all contributors.

closing in favor of this: https://github.com/puppetlabs/puppet/pull/7838 as it covers the revert


control audio volume

Ability to control audio volume from front or back end

Being that theme volume fades in and out between slides, I decided not to add an optional volume slider. An easier approach is to manually set the master volume on the device. this way Posterrr can continue to fade in/out themes.


Fix Fuzziness on QueryStringQuery

See https://github.com/elastic/elasticsearch-net/pull/2114

Lgtm


fix: correct version in README

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.94%. Comparing base (5a21949) to head (53bdf7c).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #358   +/-   ##
=======================================
  Coverage   96.94%   96.94%
=======================================
  Files          21       21
  Lines        1996     1996
=======================================
  Hits         1935     1935
  Misses         35       35
  Partials       26       26

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


pyrealsense installs to python2 instead of python3

Required Info

Camera Model
{ D400 }

Firmware Version
2.50.0

Operating System & Version
Ubuntu 20

Kernel Version (Linux Only)
5.10.104-tegra

Platform
NVIDIA jetson xavier NX

SDK Version
{ legacy / 2.. }

Language
{C/C#/labview/nodejs/opencv/pcl/python/unity }

Segment
{Robot/Smartphone/VR/AR/others }

I want my pyrealsense2 to be installed in python3
iv'e been using this instruction by @MartyG-RealSense
https://github.com/IntelRealSense/librealsense/issues/6964#issuecomment-665650908
I run the command:
cmake ../ -DFORCE_RSUSB_BACKEND=ON -DBUILD_PYTHON_BINDINGS:bool=true -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true -DBUILD_WITH_CUDA:bool=true
But still when I run sudo make install I get:
-- Up-to-date: /usr/lib/python2.7/dist-packages/pyrealsense2/pybackend2.cpython-38-aarch64-linux-gnu.so.2.50.0
Why is not installing in python3 dist-packages?

Hi @eladpar  I recommend using the Jetson installation guide at https://github.com/IntelRealSense/librealsense/issues/6964#issuecomment-707501049 which is further down the page that you linked to.

Hi @eladpar I recommend using the Jetson installation guide at #6964 (comment) which is further down the page that you linked to.

Sorry my link was wrong I did use the one you sent

/pybackend2.cpython-38-aarch64-linux-gnu.so is a filename that would be created when building the pyrealsense2 wrapper if Python 3.8 is installed on your computer.
Have you performed steps 7 and 8 - setting the PYTHONPATH and sourcing the bashrc file?

/pybackend2.cpython-38-aarch64-linux-gnu.so is a filename that would be created when building the pyrealsense2 wrapper if Python 3.8 is installed on your computer.
Have you performed steps 7 and 8 - setting the PYTHONPATH and sourcing the bashrc file?

But i'm in step 6 ...
your'e saying it did detect im using python3.8 but still put the artifacts in the wrong folder

In the guide there is a typing mistake where there should not be a space between '-' and 'DPYTHON' in - DPYTHON_EXECUTABLE=/usr/bin/python3.6
Did you close up the space between - and DPYTHON when using the CMake build instruction?  And did you modify the instruction to say python3.8 instead of python3.6 if 3.8 is the Python version that is installed on your computer?
You can confirm which Python 3 version you have with the command which python3

In the guide there is a typing mistake where there should not be a space between '-' and 'DPYTHON' in:
- DPYTHON_EXECUTABLE=/usr/bin/python3.6
Did you close up the space between - and DPYTHON when using the CMake build instruction? And did you modify the instruction to say python3.8 instead of python3.6 if 3.8 is the Python version that is installed on your computer?
You can confirm which Python 3 version you have with the command which python3

I changed it to be '-DPYTHON_EXECUTABLE=/usr/bin/python3' and I checked that my python3 executable is '/usr/bin/python3'

Hi @eladpar  Do you require further assistance with this case, please?  Thanks!

Case closed due to no further comments received.

I have the same issue, it install into python2.7 instead of python3, I follow the link you send

Hi @IricEmage  Please create a new issue for your problem by visiting the front page of this support forum at the link below and clicking the green New Issue button.  Thanks!
https://github.com/IntelRealSense/librealsense/issues/

I got it. Thanks you


Question: Can i make rest api with permanent socket connection with reactphp

I need to make REST API, and that api needs to be socket-client and to connect to socket server, and for example we would have endpoints like this:
POST /send
where server would send POST data to socket server, process answer and return response.
Is this posibble with reactphp?

Absolutely! :) From what I understand your REST API will likely require the http component to receive incoming requests and then use the socket-client component to send outgoing requests.
I hope this helps :+1:

 ini_set('MAX_EXECUTION_TIME', -1);
 set_time_limit(0);
 require_once __DIR__.'/vendor/autoload.php';

 $this->react_start = microtime(true);
 $this->react_count = 0;

 $app = function ($request, $response) {
 $this->react_count++;

 $res = call_user_func($this->react_routes[$request->getPath()]);

 $headers = array('Content-Type' => 'text/plain');
 $response->writeHead(200, $headers);
 $response->end($res);
  };

 $loop = React\EventLoop\Factory::create();
 $socket = new React\Socket\Server($loop);
 $http = new React\Http\Server($socket);

 $http->on('request', $app);

 $socket->listen(3334,'<IP_ADDRESS>');
 $loop->run();

Ok, i here have react_routes array which determine which method of main class we call to return response. (this code is method $app->start() )
I cant understand how to make methods:
/socket_connect
to connect with socket
socket_disoconnect
to disconnect with socket
socket_send
to send data to socket.
Do i need two loops? or i can use this one which i used for http server?

I'm not sure I follow what issue you're facing? Can you break this down into a reproducible gist and possibly provide a diagram of what you're trying to achieve?

Do i need two loops?

Never, not within a single program at least. Just use DI to pass your single $loop instance around.

There is gist:
https://gist.github.com/demil/4a81faf65b684a70dc39660d49ee052b
I need to have those 3 functions for connecting, disconnecting and sending data to socket.
this is working http react server, i just dont have idea how to add socket part.

Your design is still unclear to me. How is your script to supposed to be behave? In particular, what if someone sends a "send" request without first sending a "connect" request? Obviously you want to share some state between these functions, so I'd recommend starting with closures where you can easily bind additional parameters to.
See https://github.com/reactphp/socket-client#async-tcpip-connections for details on how to connect, send messages and then disconnect.

If someone sends send request and there is no socket connection, response should be - socket connection not active.

I have created function to start socket, but i don't have any clue how to send to socket or how to disconnect.
Please take look to gist if you have time:
https://gist.github.com/demil/4a81faf65b684a70dc39660d49ee052b
Thank you very much.

how to send to socket or how to disconnect.

See the above link or the stream component, you can simply call $stream->write('message'); to send any kind of data to this stream. Similarly, you can use $stream->close() to force-close the connection.
From the code you've just updated it looks like you may want to send outgoing HTTP requests so that your "REST API" works like a proxy? In this case, you're probably better off using the http-client component instead.
Again, it's still a bit unclear what you're trying to achieve. If you need more general programming advice, I suppose this may not be the best platform here. Perhaps consider posting this on stackoverflow or similar?

You certainly did not understand my requirements from beginings.
I have already using http-client, my REST api should works like a proxy between users and socket connection.

Problem is lack of documentation for reactphp library.

I have managed to make everything to work.
I have used react-socket-client and react-http, and i have managed to make REST API gateway to socket.
You were big help to me and i thank you very much.
I just have one question left, which is about react-socket-client.
When i recieve data on $stream->on('data...
is everything that i do with data asynchronous or blocking in compare to next data ariving?

I have managed to make everything to work.

Glad you've got this sorted! Feel free to share your findings for others who have trouble getting into this :+1:

is everything that i do with data asynchronous or blocking in compare to next data ariving?

All of React's components are completely non-blocking, so you'll only be notified when new data arrives and it's entirely up to you to then handle any data.


Provider prompts filter not used when running evaluate via Node package

Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch<EMAIL_ADDRESS>for the project I'm working on.
I'm running Node package and everything is great except provider.prompts filter. I have different prompts for different providers, but when running evaluate from TS it's not picked up. Everything works correctly when running via CLI. I dug a little bit, and it looks like providerPromptMap is never constructed in the evaluate function exposed as a Node package.
Here is the diff that solved my problem (generated by patch-package):
diff --git a/node_modules/promptfoo/dist/src/index.js b/node_modules/promptfoo/dist/src/index.js
index 192c8b2..24ba099 100644
--- a/node_modules/promptfoo/dist/src/index.js
+++ b/node_modules/promptfoo/dist/src/index.js
@@ -66,7 +66,7 @@ async function evaluate(testSuite, options = {}) {
             if (typeof promptInput === 'function') {
                 return {
                     raw: promptInput.toString(),
-                    label: promptInput.toString(),
+                    label: promptInput?.name ?? promptInput.toString(),
                     function: promptInput,
                 };
             }
@@ -111,8 +111,14 @@ async function evaluate(testSuite, options = {}) {
     if (options.cache === false || (options.repeat && options.repeat > 1)) {
         cache.disableCache();
     }
+
+    const parsedProviderPromptMap = prompts_1.readProviderPromptMap(testSuite, constructedTestSuite.prompts);
+
     // Run the eval!
-    const ret = await (0, evaluator_1.evaluate)(constructedTestSuite, {
+    const ret = await (0, evaluator_1.evaluate)({
+        ...constructedTestSuite,
+        providerPromptMap: parsedProviderPromptMap
+    }, {
         eventSource: 'library',
         ...options,
     });

This issue body was partially generated by patch-package.

Thank you @baransu! We'll get a fix out for this

Hi @baransu, thanks again for raising this issue and for your detailed investigation and patch! @vsauter implemented the fix, and it has been deployed. Please pull the latest version to get the update.
Feel free to reach out if you encounter any further issues.

Thank you!


binascii.Error: Odd-length string

Hello,
I think that no padding necessary isn't always the case. An example is when trying to run examples/spend_p2sh_csv_p2pkh.py with:
txid = '9a11a2dfbf135bb1d3549ebfc09e29d485839ae879992170fd22d6fe7f1fd4a7'
vout = 1

By adding .zfill(64) to keys.py#L315, it seems to work fine. Please let me know if you need more information or if I'm doing something wrong.

Thank you for reporting.
You get the error when you send the transaction to a node?
What error do you get exactly?
I will look into it. (ideally a UTXO in testnet that will replicate it would be great!)

Hello again,
The error occurs when trying to use the script above, to just create the raw signed transaction. Should it matter if it's from a valid UTXO? (even though in my local regtest it is)
The full error when running the above is:
Traceback (most recent call last):
  File "spend_p2sh_csv_p2pkh.py", line 81, in <module>
    main()
  File "spend_p2sh_csv_p2pkh.py", line 67, in main
    sig = p2pkh_sk.sign_input(tx, 0, redeem_script )
  File "/usr/local/lib/python3.6/site-packages/bitcoinutils/keys.py", line 315, in sign_input
    new_S = unhexlify( format(new_S_as_bigint, 'x') )
binascii.Error: Odd-length string

I assumed the error was when you were sending it to a node... which is not uncommon given an invalid UTXO.
You are correct, if it happens during creation of the raw tx, the UTXO itself is irrelevant as long as the txid is proper hex (which it is). The padding does not matter while one works with numbers (e.g. line above) ...not sure how the comment ended up there.
The hex does need to be even so you are right. Good catch!
I will change and test tomorrow (run the existing tests, etc.).

Great stuff. It fixes it as expected! Maybe you would like to make a pull request?  (otherwise, I will commit the change tomorrow)
Thanks!


DoS Attack

UID: CL-2020-03
Severity: high
Type: DoS
Affected Clients: Teku
Summary: Teku nodes are vulnerable to a simple DoS attack that prevents them from participating in consensus.
Links: https://github.com/ethereum/public-attacknets/issues/7
Reported: 2020-07-26
Fixed: 2020-07-31
Published: 2021-12-01
Bounty Hunter: Jonny Rhea
Bounty Points: 1250

This attack took down the attacknet. I don't see why it's only worth 1250 point?

Hey @jrhea , I'm following up this in the same way as in https://github.com/ethereum/public-disclosures/issues/29


[The One Ring 2e] 2.1.0

Changes / Comments
Features

changed stance values from "Forward/Open/Defensive/Rearward" to "1/2/3/4" because this opens the way for players to easily toggle stance by using the token bar
stance changes toggle the stance attack bonus automatically (forward:1/open:0/defensive:-1/rearward:0). The checkbox now only effects the attack damage bonus and is automatically activated when in forward stance (this can be used for Beorning with GREAT STRENGTH virtue to get +1 damage bonus in forward stance).
adversary targeted attack will take the opponent's stance into account and modify the success dice with +1/0/-1 automatically.
favoured protection rolls (e.g. due to dwarf virtue "stone hard")

Bugfixes

CM checkbox not clickable (armour with cunning make), https://trello.com/c/lM1rrRA9
swapped position of Valour and Wisdom

Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[x] Does the pull request title have the sheet name(s)? Include each sheet name.
[x] Is this a bug fix?
[x] Does this add functional enhancements (new features or extending existing features) ?
[x] Does this add or change functional aesthetics (such as layout or color scheme) ?
[ ] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?
[ ] If this is a new sheet, did you follow Building Character Sheets standards ?

If you do not know English. Please leave a comment in your native language.

Character Sheet Info Roll20 Internal Use only.


Pinot for Production

good morning sir, I'm new to pinot, I want to develop pinot into production, can you give me an example of things I should do?( like a few of server , broker and controller, on one cluster and the diagram) btw I use kafka for the input. Which one is better, real-time only or hybrid?

Hello skyb92,
Welcome to the pinot community.
Depending on the scale of things, you should have appropriate number of machines for servers, brokers and controllers. I suggest experimenting by generating a pinot segment, estimating how many segments you will need at any given time, what your replication factor is, and set up number of servers depending on the memory requirement. Pinot segments are stored in memory, so this is a start. You may need more servers to improve query throughput (or less, if your query rate is low, you may just MMAP the segments).
Having more than one controller and more than one broker is always a good idea in production.
It is your choice whether you want to use Hybrid or real-time-only solution. Hybrid may work better (at this time) if your retention is larger than a few days.
-Subbu

Hello @mcvsubbu ,
Thank you for your advice.  I'll post my progress soon.
Pinot is awesome!!
-Skyb

I got this error message when I restarted pinot, any suggestions?
Caught exception while processing resource mmcloud_facebook_akun_stat_REALTIME, skipping.
java.lang.NullPointerException
at com.linkedin.pinot.controller.helix.core.realtime.PinotRealtimeSegmentManager.assignRealtimeSegmentsToServerInstancesIfNe
cessary(PinotRealtimeSegmentManager.java:207)
at com.linkedin.pinot.controller.helix.core.realtime.PinotRealtimeSegmentManager.processPropertyStoreChange(PinotRealtimeSeg
mentManager.java:291)
at com.linkedin.pinot.controller.helix.core.realtime.PinotRealtimeSegmentManager.access$000(PinotRealtimeSegmentManager.java
:66)
at com.linkedin.pinot.controller.helix.core.realtime.PinotRealtimeSegmentManager$1.onControllerChange(PinotRealtimeSegmentMa
nager.java:105)
at org.apache.helix.manager.zk.CallbackHandler.invoke(CallbackHandler.java:209)
at org.apache.helix.manager.zk.CallbackHandler.init(CallbackHandler.java:324)
at org.apache.helix.manager.zk.CallbackHandler.(CallbackHandler.java:114)
at org.apache.helix.manager.zk.ZKHelixManager.addListener(ZKHelixManager.java:317)
at org.apache.helix.manager.zk.ZKHelixManager.addControllerListener(ZKHelixManager.java:426)
at com.linkedin.pinot.controller.helix.core.realtime.PinotRealtimeSegmentManager.start(PinotRealtimeSegmentManager.java:102)
at com.linkedin.pinot.controller.ControllerStarter.start(ControllerStarter.java:133)
at com.linkedin.pinot.tools.admin.command.StartControllerCommand.execute(StartControllerCommand.java:155)
at com.linkedin.pinot.tools.admin.PinotAdministrator.execute(PinotAdministrator.java:113)
at com.linkedin.pinot.tools.admin.PinotAdministrator.main(PinotAdministrator.java:125)

We need the complete exception stack to say better, but this looks like
some entries in zookeeper are not correct. I suggest you drop the table
(wait for external view to clear out) and re-create it afresh.
Also,  make sure your helix instances are tagged correctly.
-Subbu
On Tue, Mar 14, 2017 at 10:21 PM, Y.A<EMAIL_ADDRESS>wrote:

I got this error message when I restarted pinot, any suggestions?
Caught exception while processing resource mmcloud_facebook_akun_stat_REALTIME,
skipping.
java.lang.NullPointerException
at com.linkedin.pinot.controller.helix.core.realtime.
PinotRealtimeSegmentManager.assignRealtimeSegmentsToServerInstancesIfNe
cessary(PinotRealtimeSegmentManager.java:207)
at com.linkedin.pinot.controller.helix.core.realtime.
PinotRealtimeSegmentManager.processPropertyStoreChange(PinotRealtimeSeg
mentManager.java:291)
at com.linkedin.pinot.controller.helix.core.realtime.
PinotRealtimeSegmentManager.access$000(PinotRealtimeSegmentManager.java
:66)
at com.linkedin.pinot.controller.helix.core.realtime.
PinotRealtimeSegmentManager$1.onControllerChange(PinotRealtimeSegmentMa
nager.java:105)
at org.apache.helix.manager.zk.CallbackHandler.invoke(
CallbackHandler.java:209)
at org.apache.helix.manager.zk.CallbackHandler.init(
CallbackHandler.java:324)
at org.apache.helix.manager.zk.CallbackHandler.(CallbackHandler.java:114)
at org.apache.helix.manager.zk.ZKHelixManager.addListener(
ZKHelixManager.java:317)
at org.apache.helix.manager.zk.ZKHelixManager.addControllerListener(
ZKHelixManager.java:426)
at com.linkedin.pinot.controller.helix.core.realtime.
PinotRealtimeSegmentManager.start(PinotRealtimeSegmentManager.java:102)
at com.linkedin.pinot.controller.ControllerStarter.start(
ControllerStarter.java:133)
at com.linkedin.pinot.tools.admin.command.StartControllerCommand.execute(
StartControllerCommand.java:155)
at com.linkedin.pinot.tools.admin.PinotAdministrator.
execute(PinotAdministrator.java:113)
at com.linkedin.pinot.tools.admin.PinotAdministrator.main(
PinotAdministrator.java:125)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/linkedin/pinot/issues/1138#issuecomment-286643870,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACLGfVbJ1ed5_Js_zP1-74YkEMdEHKNFks5rl3VCgaJpZM4MbEuK
.

Thank you @mcvsubbu it really helps.


adding interface veth to bridge ovsbr0 failed: operation not supported.

adding interface veth5682e69 to bridge ovsbr0 failed: operation not supported.

Please provide more details.
The issue template is there for a reason, unfortunately we cannot help with so little to go on.

https://raw.githubusercontent.com/docker/docker/master/.github/ISSUE_TEMPLATE.md

Closing for now until we can get more detail.


Select: Opt out of transitions when repositioning Select.Content

Describe the feature in detail (code, mocks, or screenshots encouraged)
Hi! Thank you very much for creating and maintaining this package!
I've been using the  "1.0.0-next.65" version and have been referring to the documentation listed here: https://next.bits-ui.com/docs/components/select#opt-out-of-floating-ui. I have built a Select component with the library, but ran into some unexpected behaviour. I'm a bit torn between calling this a feature request or a bug.
The Select.Content component automatically positions around the Select.Trigger component. By default, and according to the docs, the positioning of the Select.Content is done using Floating UI. If you'd like to opt out of this and position the element yourself, you can use the Select.ContentStatic released in https://github.com/huntabyte/bits-ui/issues/293.
I'd like to use the default positioning, but I'd like to opt out of the "transition" effect when the Select.Content element's position is recalculated after scrolling. This effect can reproduced by:

opening the documentation site for the Select component: https://next.bits-ui.com/docs/components/select#multiple-selection
Opening a Select dropdown
Scrolling up and down

I made this quick screen recording to show what is happening:
https://github.com/user-attachments/assets/80fea8b0-edc3-47f9-8431-5bf8124e80d7

I'd like this repositioning to be snappy and instant. Currently it feels like the user can scroll the page, and the Select.Content drags behind a little before popping into the correct place. Please let me know if I can provide more details.
What type of pull request would this be?
Enhancement
Provide relevant links or additional information.
https://next.bits-ui.com/docs/components/select#multiple-selection

What browser are you using there? I see what you're referring to in your video but am having a difficult time reproducing the behavior on chrome.

What browser are you using there?

Using Chrome on MacOS, also used Firefox and verified the behaviour there, but 👇 .

I see what you're referring to in your video but am having a difficult time reproducing the behavior on chrome:
@huntabyte are you by any chance using a trackpad in the recording? I'm able to consistently trigger the effect when using a mouse with a scroll wheel.

When I'm using the internal trackpad on my MacBook to scroll the page, I don't encounter the effect, and it seems to match your experience. Curious to hear your response.

I'm using a mouse in that video!

I'm using a mouse in that video!

I'll see if I can produce some more reliable parameters then. Thanks for checking!

Feel free to reopen with more reliable parameters!


python3Packages.pytest-xdist: 2.2.1 -> 2.3.0

Motivation for this change
https://github.com/pytest-dev/pytest-xdist/blob/v2.3.0/CHANGELOG.rst
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 127247 at 2f4ac303 run on x86_64-linux 1

17 packages marked as broken and skipped:

cassandra_2_1
cassandra_2_2
googleearth-pro
grass
hadoop
hadoop_2_7
hadoop_2_8
hadoop_2_9
impressive
invoice2data
linuxPackages_hardkernel_4_14.virtualbox
linuxPackages_hardkernel_latest.virtualbox
natron
odpdown
opentsdb
pig
spark

11509 packages skipped due to time constraints:

DisnixWebService
EBTKS
Fabric (python38Packages.Fabric)
MACS2
R
_389-ds-base
abcl
acd-cli
acousticbrainz-client
actdiag (python38Packages.actdiag)
...

7 packages built successfully:

python38Packages.betamax
python38Packages.chardet
python38Packages.hypothesis
python38Packages.pytest-xdist (python38Packages.pytest_xdist)
python38Packages.requests
python38Packages.requests_download
python38Packages.responses

Merged into my local working tree for python-unstable. Thank you.


Pattern-matching: function name matches are case-sensitive; should they be?

The pattern f(?) is not matched by the expression F(x).
Names in JME are usually case-insensitive. I'd rather this wasn't the case, but it's too late to change now. I'd expect function name matching not to be case-sensitive either. Variable name matching is not case-sensitive - the pattern x is matched by the expression X.
For consistency, even though it makes differentiating function names by case impossible, I think function name matching should be case-insensitive.

Matching functions now follows the scope's case-sensitivity, so you can distinguish F(x) from f(x) in case-sensitive scopes.


Add type hints for parameters and return

I've run following tests with the patch:
./do.sh run test-scenarios/ovn-20.yml ovn-20
./do.sh run test-scenarios/ovn-low-scale.yml ovn-low-scale
./do.sh run test-scenarios/ovn-low-scale-ic.yml ovn-low-scale-ic

This PR made me learn what type hints are.
I've no objections to it.  If this PR is accepted,  I'd suggest make it a norm (or must) for new PRs to follow type hinting.
If it is too much of an ask for other contributors then perhaps its better to drop this PR.
Thanks

This PR made me learn what type hints are.
I've no objections to it. If this PR is accepted, I'd suggest make it a norm (or must) for new PRs to follow type hinting. If it is too much of an ask for other contributors then perhaps its better to drop this PR.
Thanks

Good point, there actually are ways to enforce this.  One way is to run mypy ..  as a GitHub action check on new PRs.

This PR made me learn what type hints are.
I've no objections to it. If this PR is accepted, I'd suggest make it a norm (or must) for new PRs to follow type hinting. If it is too much of an ask for other contributors then perhaps its better to drop this PR.
Thanks

Good point, there actually are ways to enforce this. One way is to run mypy ..  as a GitHub action check on new PRs.

It makes sense, however if we want to check those rules it should be part of the PR so there is no chance to "break" in the meantime.

This PR made me learn what type hints are.
I've no objections to it. If this PR is accepted, I'd suggest make it a norm (or must) for new PRs to follow type hinting. If it is too much of an ask for other contributors then perhaps its better to drop this PR.
Thanks

Good point, there actually are ways to enforce this. One way is to run mypy ..  as a GitHub action check on new PRs.

It makes sense, however if we want to check those rules it should be part of the PR so there is no chance to "break" in the meantime.

Sure, that's the ideal way.  However, I think it's a pity to delay this PR for that.  I opened an issue to track running and enforcing rules with mypy on new PRs: https://github.com/ovn-org/ovn-heater/issues/192


Paths with special characters like parentheses

What's the best way to have paths with special characters like ( or )?
Right now, the only solution I found is defining paths like this:
path: "/:name<.*>"

The problem with this approach is that I have to do this for every path I define, but I have multiple path variables that can include ( and ) (as well as other symbols).
It seems like I should be able to use path-parser's ignoreConstraints flag. However, router5 doesn't seem to have a way to set that flag in path-parser.

I had same issue with brackets, so I just declared a const with the regex for my params and used them in all the route path config


Add example with WASM audio worklet

This example runs an oscillator in WASM inside an audio worklet. Volume and frequency is controllable in the UI exposed by the main thread. A design goal was to abstract worklet and JS module handling in a way that can be handled by a library with minimal annoyance for application developers. Therefore, the Rust modules gui, oscillator, wasm_audio, and dependent_module are fairly decoupled.

Thanks! I don't have the time to do an in-depth review of the code here but @Liamolucko would you be perhaps interested in doing so? If not no worries I'm happy to merge regardless.


InputNumberSlider ignores Options.Step and has undocumented rounding behaviour

Nice work with the slider! It's awesome that you can double-click to edit the value. However, I find the way InputNumberSlider vs InputNumberDrag work a bit confusing. I'd expect the difference is just the visible slider, it looks like the drag behaviour is also different, but also they have different rounding behaviour.
InputNumberDrag takes a Step value which allows the user to determine if the output is an float.
InputNumberSlider takes no Step value and seems to use maximum precision. To make the result an float, you need to pass a float as either MinNumber or MaxNumber (which seems elegant, but I rarely pass floats as limits).
For me, a common value to adjust is in [0,1]. To use InputNumberSlider, I have to limit my choices so either 0 or 1 is not a valid value or allow going outside of my desired range. I find the slider handle to be a useful visual for where the current value is within the range. If I use InputNumberDrag, then I lose this visualization.
The documentation for GetInputNumber() doesn't mention the rounding behaviour. Even if it did, it would be confusing like this:

If Options.DrawSlider is true or InputNumberSlider was used and both Options.MinNumber and Options.MaxNumber were integers, the result is an integer.

the InputNumberSlider documentation implies that Step would be valid since it's an option for Slab.Input.

Options: [Table] List of options for how this input control is displayed. See Slab.Input for all options.

So maybe it's a bug that Step is not used by InputNumberSlider?

Glad you like the sliders @idbrii. This is a first pass implementation of the sliders and I am glad to hear some feedback on this so soon. The behavior of the sliders is based off of what is done by Dear ImGui.

The step value was added to control the speed of the sliders, and whether to drag with integer values or floating point values. The reason for not passing the step value to InputNumberSlider is because the value is dictated by the position of the cursor where as InputNumberDrag and not some changing value based on mouse delta.
I do see the issues you bring up with wanting floating point vs integer. I am thinking of changing Step to Precision so that the step is controlled more by how precise the return value should be. This should help with your situation where you want sliders between 0 and 1 and the precision will dictate how many decimals to operate on, which by default will be 3 so the values will be between 0.000 and 1.000.
Along with this, I want to change the speed of the drag change to be based on the size of the range. Hopefully these changes will improve the usability.

Hi @coding-jackalope
I just wanted confirm this issue with sliders. And let You know I also use it in my project :blush:


Feedback link doesn't go to feedback site

This page states:
"If you would like to see other operating system and browser support, please leave feedback using the product feedback tool at the bottom of the page."
However, instead of going to https://feedback.azure.com, the feedback link goes to https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/support-help-options. Where are we supposed to submit this feedback?
I would love to see Opera support. It's Chromium and my FIDO2 key works with other sites.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 5c860853-d58e-ba80-9cd4-04d33e1dd2e2
Version Independent ID: 5ff539d2-5826-4de1-6d93-55b95a7b041c
Content: Browser support of FIDO2 passwordless authentication
Content Source: articles/active-directory/authentication/fido2-compatibility.md
Service: active-directory
Sub-service: authentication
GitHub Login: @knicholasa
Microsoft Alias: nichola

Hi, we are investigating your issue and will update you shortly.
Best,
James

Hi @capmgn , we recently launched our new User Voice platform here: https://feedback.azure.com/d365community . I do agree though that this link should be in the document. I'll reach out to the author about it.
I am going to close this issue out but if you have any questions please post back.
Best,
James


[Chart] Webhook init and cleanup template files have wrong toleration block placement

Tolerations are placed outside the if block.
This is in both webhook-cleanup-job.yaml and webhook-init-job.yaml
When webhooks are disabled, the file will only contain tolerations which causes this error from helm-operator:
Warning  FailedReleaseSync  104s (x6 over 10m)  helm-operator  synchronization of release 'spark-operator' in namespace 'spark-operator' failed: installation failed: unable to build kubernetes objects from release manifest: error validating "": error validating data: [apiVersion not set, kind not set]

I had the same problem using nodeSelector. As it is outside the block, the template is generated incorrectly by helm.
nodeSelector:
        app: example
---
# Source: spark-operator/templates/webhook-cleanup-job.yaml
nodeSelector:
        app: example
---
# Source: spark-operator/templates/webhook-init-job.yaml
nodeSelector:
        app: example
---


Feature Request : Website

Feature :

Add hover in the navbar

Instead of clicking on learn, we can hover over learn to get the dropdown.

Please, no.
I hate being aggressed by a menu when casually moving my mouse.
If someone wants to learn about Stride, is one click that hard ?

Thank you for your feedback @Nicogo1705. I was actually waiting for some additional feedback on this topic. Bootstrap framework which we are using actually defaults to the behaviour we have. They had many discussions on this subject and they decided that this seems to be more user friendly. Including, it is also mobile friendly, because we only click or tap on mobile devices.
I try to keep the top navigation super simple and if you express an interest on any subject, indeed you can just click.
I will leave this open just in case the trend has changed and I missed something :)


house of spirit for tcache

Thanks! Could you add this to the readme?

yes, I forgot about this. It is ok to make second commit ? Or should I do second commit and squash 2 commits into 1 ?

A second commit is fine:-)

done

done

Thanks!


Argo Workflows v3.1.0 tag manifest has latset tags in images

Summary
What happened/what you expected to happen?
Installed Argo workflwos from v3.1.0 tag and expected images to be pinned to 3.1.0.
Used:
kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo/v3.1.0/manifests/install.yaml

Images installed have tag latest - can be verified with:
kubectl get pods -n argo -o yaml | grep image

Duplicate of https://github.com/argoproj/argo-workflows/issues/6219


WIP: Switch to golang 1.12

@csrwng is this still a wip?  If not, I'll +1 it.

@twiest thanks, I wanted it to let it build the images and see if there were any issues first before removing the WIP

@twiest looks like things are building fine... removing the WIP tag


Consider update port/erpc_serial.cpp.

There was a bug in that file(#182 ). I am not sure if this file is original or it was modified in our repositories (should be easy to find out, track file changes in git, but file name was changed meanwhile).
We should consider update the file if there is new version of it. But original person who inserted that file in repository is no longer active. I found this one: https://github.com/BusPirate/Bus_Pirate/blob/b580ca9dcda14b7c64b6be2ed1b4b376366b1738/scripts/powertools/SPISniffer/linux-version/serial.c

So the files above are not same as one we have in repository.


Werner Vogels is in India, and HelloPlaces doesn't know it

We should probably check to see if a location is missing from international geotagged tweets, so we don't show the "@" sign.
http://cl.ly/1S322K073r2N0H2y3H1c

Fixed in e1f25406d2ef178f2f8ad9a15b2594b157be7901


dilate skins

would be nice to automatically dilate skins before uploading to skin database, or have some sort of mass-dilate functionality in the web editor

fixed by 80346a4b2d71c7b7be381607cdac8bd131f7bb18


Lighting Research

Godot's 2D internal lighting system doesn't achieve what I want.
e.g. I want a shadow emitted on the ground from the top of a swingset. Instead, implementing lighting on that will act as a wall blocking light.

[ ] ~Ask Godot Discord for any ideas on how to achieve this effect~
[x] Look for Asset Libraries that may address this issue
[x] Look into what I would need to do for custom lighting to be implemented
[x] Let go of using shadows in non dark scenes, and only use lights for things like fireflies
[x] Research normal maps (done by Dom)

We seem to have exhausted our options. We will stick with using simple lighting with simple shapes, & normal maps sparingly when it will help.


Key type

I'm not sure if it's the right place to ask it but I'm trying to store some widget's keys in Rust but I don't know what type I should use in my Rust code to store Flutter's Key type. I searched in the doc but I can't find a concrete way to do so. So is it possible? And if not maybe it could be interesting to add a Key type for Rust to use?

Nevermind I can just store the keys as a Strings with a key.toString() on the dart side :')
It's too early in the morning my brain doesn't work

Nevermind I can just store the keys as a Strings with a key.toString() on the dart side

I think so, that looks like one possible way

I am interested in why storing widget's key in rust.🧐

I am interested in why storing widget's key in rust.🧐

My approach might not be ideal, but my goal was to use specific widget methods as callbacks in Rust. When a widget is created, I register one of its methods as a callback in Rust, along with a unique key for that widget. Then, when the widget is recreated or destroyed, I unregister its callback in Rust within the destructor. Since there are multiple widgets with multiple registered callbacks, I need a way to unregister only the callbacks associated with the destroyed widget, which is why I store their keys in Rust.
And why register some widget methods as callbacks in Rust? Because I need a way to adjust the widget states based on events that occur on the Rust side.
Let me know if my explanation is not clear or if you want more details
by the way sorry for my unnatural english ;-;

I agree with the first paragraph. But if a widget's state depends on rust's state, passing a enum which express the event to dart side is a better approach in my opinion.
pub enum LoadingState {
    Loading,
    Done
}

pub fn load(sink: StreamSink<LoadingState>) {
    sink.add(LoadingState::Loading);
    thread::sleep(Duration::from_secs(1));
    sink.add(LoadingState::Done);
}

StreamBuilder(
    stream: load(),
    builder: (context, snapshot) {
        return switch(snapshot.data) {
            LoadingState.loading => Text("loading"),
            LoadingState.done => Text("done"),
        };
    }

Let me konw if I have any misunderstanding on your situation.

Oh well I didn't know about StreamBuilder widgets, I'm very new to Dart and Flutter. However I'm not sure how to implement this anyway. For now my situation is this: I have a local server running in Rust that needs to update some widgets in Flutter when it receives external data for example. When an event from the server occurs, the only way to inform Flutter that something happened is by calling a callback (maybe I'm wrong here?). From here, how can I call the stream function to update a state in Flutter? And if I update the state directly in Rust, how will Flutter know that a state has just changed? I feel like I still need to register the StreamBuilder stream as a callback in Rust but maybe I'm missing something obvious?
Let me know if it's not clear!

Close since this seems to be solved, but feel free to discuss further, or reopen if needed!


Race condition during script startup

The first thing that firmware-util.sh does is download firmware.sh, functions.sh, and sources.sh from the master branch.
If someone has the bad luck to be in the middle of running that download while an update is being pushed, they'll run the new version of sources.sh with the old version of firmware.sh (functions.sh is a crapshoot.)
The most robust way to eliminate this problem would be either to:

Fetch the commit ID of current master, then fetch the files from that specific commit
Put files into a release, then download the latest release file.

I've put together a proof-of-concept that works on my test Linux box (though I can't confirm that it works from crosh in an unpatched Chromebook, since I don't have one of those.)
You can see it in action here:
curl -LO 'https://raw.githubusercontent.com/Stevie-O/bootstrap-download-test/master/util/update-and-run.sh'
bash update-and-run.sh

This code will download the .tar.gz for the latest release, unpack it into a 'bdt-files' subdirectory, and then
run the main script, which then runs three other scripts.

while I understand how this could be a problem in theory, I'm not seeing the real-world benefit.  Half the point of the current setup is that I wouldn't have to do releases.


Simplify interpolation by inspecting strings

Since %(#{k}="#{v}") is a bit confusing to parse for a human..
The other alternative is to escape double-quotes "#{k}=\"#{v}\"" which I feel is uglier.
String#inspect returns itself quoted and with any special characters escaped.

Okay then. I'll close this.


Improve fetchScans in Monitor

Drop code that was trying to remove scans older than 5 mins
Active scans tracking is at the mercy of the server so let it determine
what gets put in the monitor map

Was this code added because the TServer was reporting scans that were not actively running?

Was this code added because the TServer was reporting scans that were not actively running?

It was a part of the initial creation of the method. The method was added to do the opposite (report long running scans) to help debug bigger problems with a cluster in commit 7f329a9c4dbf6f249a14a1f4bde43f261bf12875. See https://issues.apache.org/jira/browse/ACCUMULO-2645. But the code to age off old scans isn't thread safe and I am not sure why you would just remove a scan only 5 minutes later after reporting it. If an admin doesn't see the scan in that window, its useless to put it on the monitor. If there are long running scans being returned than I think they should get displayed. It is disingenuous to report no scans running if there are.

I was able to simulate a long running scan using SlowIterator with these two shell commands:

config -t test_ingest -s table.iterator.scan.slow=1,org.apache.accumulo.test.functional.SlowIterator
config -t test_ingest -s table.iterator.scan.slow.opt.sleepTime=1000

I was wrong about this chunk of code. It isn't thread safe but it does only remove inactive tservers from the allScans map. It sets the fetched value every time it gets an active scan for that tserver. So when there are no more active scans for that tserver, it gets dropped from allScans.

I changed this to make the remove code more thread friendly

Nevermind, this is not needed since its in the same method that adds to the map.


Idea: client side timestamp

Not all my cameras can show timestamps in the video, and even with those that do I mostly look at them to check that the video is still running (mostly on slow mobile connections).
What is your opinion on an optional (disabled by default) timestamp that shows the time when the last frame was received?
👍 Or 👎 ?

How you plan to get this info?

There's the loadeddata and the timeupdate events of the video tag. The idea would be to update the fake timestamp to the present when triggered

If that works - client timestamp is a good idea.

I think it will work, I made something similar to show a red dot when video was running and it was reliable (at least android and chrome).
I was thinking it could be like this:
local_timestamp: true
local_timestamp: DD/MM/YY hh:mm:ss:mmm

I'll look if there is any minimal formatter I could use. Then styles can be configured with the existing style yaml key

Wdyt about string replacement?
Something like
format
  .replace('YY', date.getYear())
  .replace('MM', date.getMonth())
  .etc...

(I'll have to consider padding too, but you get the point)
I'm a bit worried about increasing your code's size a bit

local_timestamp: true - needless. Just local_timestamp: DD/MM/YY hh:mm:ss.sss will be enough.

This is the simplest way I could come up with for the formatting.
const pad = (p, n) => String(n).padStart(p, '0');

function getTimestamp(format) {
  const d = new Date();
  const h = d.getHours();
  return format
    .replace('DD', pad(2, d.getDate()))
    .replace('MM', pad(2, d.getMonth() + 1))
    .replace('YY', String(d.getFullYear()).slice(-2)
    .replace('hh', pad(2, format.includes('am') ? (h % 12 || 12) : h))
    .replace('mm', pad(2, d.getMinutes()))
    .replace('ss', pad(2, d.getSeconds()))
    .replace('sss', pad(3, d.getMilliseconds()))
    .replace('am', d.getHours() >= 12 ? 'PM' : 'AM');
}

Maybe https://caniuse.com/mdn-javascript_builtins_intl_datetimeformat_format
This locale related format

I didn't know that was that well supported, I'll take a look at that. Maybe I can pass the options directly

I'd like to wait for the other PRs to be merged to avoid merge conflicts.


Multiple upload only uploads 2 files

Stay Home, Keep Safe Everyone.
Summary
Multiple uploads only upload 2 files and save to static folder and the rests are the loading animation never stops. Both client and server allow only a maximum of 5 files.
...
How to reproduce
Below is my sample code the uses React
import React from 'react'
import { FilePond, registerPlugin } from 'react-filepond'
import FilePondPluginFileEncode from 'filepond-plugin-file-encode'
import FilePondPluginImagePreview from 'filepond-plugin-image-preview'
import FilePondPluginFileValidateType from 'filepond-plugin-file-validate-type'
import FilePondPluginFileValidateSize from 'filepond-plugin-file-validate-size'
import FilePondPluginFilePoster from 'filepond-plugin-file-poster'

import 'filepond/dist/filepond.min.css'
import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css'
import 'filepond-plugin-file-poster/dist/filepond-plugin-file-poster.css'

registerPlugin(FilePondPluginImagePreview, FilePondPluginFileEncode, FilePondPluginFileValidateType, FilePondPluginFileValidateSize, FilePondPluginFilePoster)

const { REACT_APP_API_BASE_URL, REACT_APP_API_PORT } = process.env
const apiBase = `${REACT_APP_API_BASE_URL}:${REACT_APP_API_PORT}`

const Uploader = () => {
    return <>
        <FilePond
            allowFileSizeValidation={true}
            name='files'
            maxFiles={5}
            allowMultiple={true}
            allowFilePoster={true}
            labelIdle='Drag & Drop files or Browse'
            server={`${apiBase}/api/uploads/`} />
    </>
}

export default Uploader

in my server is...

const storage = multer.diskStorage({
    destination: function (req, file, cb) {
        cb(null, uploadPath)
    },
    filename: function (req, file, cb) {
        const id = shortid.generate()
        cb(null, `${id}_${file.originalname}`)
    }
})

const mb = 50
const limits = {
    fileSize: mb * 1024 * 1024
}

const upload = multer({ storage, limits }).array('files', 5)

router.post('/', upload, (req, res) => { //TODO: auth before upload...
    console.log('uploading...')
})

...
Expected behaviour
Should upload 5 files.
...
Additional information

I tested random files. For every batch to drop down will only pick 2 files and the rest still loading.
Each files are not 50 mb above. Just dummy images and files were tested.
Multer doesn't show errors.
I ask to multer community but someone says not a problem with multer. Here is the link https://github.com/expressjs/multer/issues/866
shortId is only a generator of name
...

Environment
Version

OS
Windows 10 64bit

Browser
Chrome Version 80.0.3987.149 (Official Build) (64-bit)

react
16.8.6

react-filepond
7.0.1

filepond
4.13.0

filepond-plugin-file-encode
2.1.5

filepond-plugin-file-poster
2.2.0

filepond-plugin-file-validate-size
2.2.1

filepond-plugin-file-validate-type
1.2.5

filepond-plugin-image-preview
4.6.1

multer
1.4.2

Can you try unregistering the FilePondPluginFileEncode plugin.

@rikschennink still same :(

@avillarubia Then I honestly don't know, if you create a public test case I can take a look.

@rikschennink it is now solved, I remove node_modules and reinstall and update but not for this concern.
Thank you for your time

I had the same issue and I solved it by setting maxParallelUploads attribute to a sufficiently high number. I played with this number a little bit and if I don't set the attribute at all, the upload stops after the second file is uploaded. Maybe 2 is a hidden default? If I set a low number, 3 for example, the upload is stopped after the third file is uploaded. So it looks like the next batch of parallel uploads is not started.

We had the exact same issue, and @Shadowsm29 's solution worked for us too.
Perhaps @rikschennink can shed some light on why this is the case?

@gmw-web default is 2 but should then pick up next file, if that doesn't happen it would be helpful if you can supply a public test case

Tried to create a sandbox, but I can't replicate the issue a.t.m.. I will take a better look when I have a bit more time.

Ended up here for exactly the same reason, but worked out what I was doing wrong, so leaving a note in case someone else (or me in the future) has this issue.
I'm using react-filepond (not the problem) and the component wouldn't upload anything after 2 files, whether opening 3 at once or adding them one at a time. The process wasn't hitting the console log either for the 3rd+ files. The first 2 files were uploaded, but what I didn't notice was that the "complete" indicator didn't correctly change to the "X" for undo.
My issue was that I was using a custom server process function, but never called the "load" method on successful upload.
server={{
process: async (fieldName, file, metadata, load, error, progress, abort, transfer, options) => {
// do your uploading method

uploadFile(file).then((id) => {
 **load("finished");**

});
}


Changed api-version to v1 and added matchLabels to deployment spec

Upgraded the api-version to apps/v1 as apps/v1beta1 got deprecated and is causing the pipeline to fail.

NIT: This is supported on kubernetes versions >= 1.16. For previous versions, the existing template is still valid. Should we explicitly call out about the version somewhere?

Will apps/v1 be backwards compatible for older versions? If not, we should call it out in the doc for "Deploy to AKS" starter pipeline.

According to the kubernetes documentation, apps/v1 is available since v1.9. So, it should be compatible with most of the older clusters.

Okay, I'll add the details to the doc as well.


Error: File not found: '/home/runner/work/_actions/azure/k8s-set-context/v4/lib/index.js'

What happened?
Bumped up from v3 to v4 and got the error in the title.
Version

[X] I am using the latest version

Runner
github runner
Relevant log output
https://github.com/python-discord/site/actions/runs/8231726001/job/22507717765

@davidgamero
I noticed in https://github.com/Azure/k8s-set-context/issues/55 you said you appreciated the ping for a similar issue to this, so I'll do the same here.

Just updated from v3 to v4 and got the exact same thing. Another lesson to upgrade one service and not all at once... #reverting #fun

@ChrisLovering thank you for reporting this issue, i've regenerated the tag on the latest release and can now see the /lib dir on the tag's hash checkout
please let me know if you continue to have any issues

Can confirm that works now.
https://github.com/python-discord/site/actions/runs/8231726001/job/22525283159
Thanks for your help David.

@davidgamero Thanks for the quick response. One small thought though:
Re-uploading another version with the save version tag is not a good idea, as it also breaks some automatic upgrade mechanisms and caching. It would be better to release a v4.1 or v5 with a small note what has been fixed, so people are not wondering why their build results changed dramatically without any update from their part.


threebot start reports threebot started too quick

✅ Threebot server started

Visit admin dashboard at: http://localhost/

It should wait until nginx + gedis port is taken

threebot start command waits for each port of (80, 443, 16000, 8999) of services before success message.
if a port of the above is not ready within 15 seconds the command will exit and you should stop the server then try again

In my case it does not even bother to start anything tmux stays empty startupcommand does not look like its being run.
Altough when  running
jsng 'j.servers.threebot.start_default(wait=True)' it works fine

Fixed in https://github.com/threefoldtech/js-sdk/commit/575de3ef98af98f6a1bce721c832e02d7bd07864

Verified


Remove license year 2: Electric Boogaloo

Description of the change:

Remove license year from codegen (again)
Use controller-gen for deepcopy

/lgtm

/approve

/lgtm


Get as close as possible to full no_std support

To really get no-std support in parley, we need to land dfrg/swash#63. But I believe I've done everything else that's necessary, in both parley and fontique. One can test the build by patching Cargo.toml to use the working branch for that swash PR, and modifying parley/Cargo.toml to specify swash/std or swash/libm as appropriate. If we decide to land dfrg/swash#63 before landing this one, then I can make the latter modification to parley/Cargo.toml before merging this PR.
Some of my changes, e.g. unconditionally using alloc::vec::Vec, are designed to minimize the amount of noise when searching the whole source tree for "std".

I saw @xorgy's approval. The only reason I'm not merging this immediately is that I wonder if we should land dfrg/swash#63 first, and publish a new version of swash (presumably a semver-breaking release), so we can go all the way with this PR. If people think it would be better to merge this PR immediately, that's fine.

https://github.com/dfrg/swash/pull/63 and https://github.com/dfrg/swash/pull/61 have both landed now. I have submitted a couple of additional PRs for swash and I don't know what his plans are for doing a new release.

I think it's fine to land this and when swash gets released do those steps in a separate PR.
Merged PRs are better than lingering PRs. When work can be split, it should. Helps reduce merge conflicts for yourself and others. Keeps the ball rolling.


Responsive Options

Hi there,
Is there an option to toggle this plugin's scrollbar on certain screen-widths? I mean something like when the viewer is on a tablet device, the scrollbars do not appear, and on desktop, they appear.  Similarly, when the viewer changes the browser width and the width gets narrower than a set width, the scrollbars appear/disappear depending on the setting.
Basically it is an option for responsive design. It will be great if this is supported.

Hello,
You can use plugin's destroy method within a script that will detect viewport size. There are many ways to do this and I'm posting the ones I've tested and use most:
1. Apply the custom scrollbar only on desktop
This will work independently of window/viewport size. It uses mobile-detect.js to detect the actual device and not just viewport size.
<!-- load mobile-detect.min.js from CDN -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/mobile-detect/0.4.3/mobile-detect.min.js"></script>

<!-- initialize custom scrollbar on non-mobile devices -->
<script>
	(function($){
		var md=new MobileDetect(window.navigator.userAgent);
		$(window).load(function(){
			if(!md.mobile()){
				$(selector).mCustomScrollbar();
			}
		});
	})(jQuery);
</script>

2. Switch between native and custom scrollbar according to window/viewport width
Any of the following will work. The conditions will match CSS media queries. The examples assume you want to enable custom scrollbar when viewport width is greater than 640 pixels.
2.a Works on new and old browsers, can match most CSS media queries
$(window).on("load resize",function(){
	var winWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
	if(winWidth>640){
		$(selector).mCustomScrollbar();
	}else{
		$(selector).mCustomScrollbar("destroy");
	}
});

2.b Works on modern browsers (IE10+), can match all CSS media queries
$(window).on("load resize",function(){
	if(window.matchMedia("(min-width: 640px)").matches){
		$(selector).mCustomScrollbar();
	}else{
		$(selector).mCustomScrollbar("destroy");
	}
});

2.c Works on any browser that supports CSS media queries
Assuming the element with the scrollbar has id content-1
CSS (dummy element to check media query break-point):
<style>
	#content-1:after{ display: none; content: "custom-scrollbar"; }
	@media screen and (max-width: 640px){
		#content-1:after{ content: ""; }
	}
</style>

JS:
$(window).on("load resize",function(){
	var selector="#content-1",
	    cssFlag=window.getComputedStyle(document.querySelector(selector),":after").getPropertyValue("content").replace(/"/g,'');
	if(cssFlag){
		$(selector).mCustomScrollbar();
	}else{
		$(selector).mCustomScrollbar("destroy");
	}
});

Hope this helps


Fixing various documentation typos

Closes #4826 - @internationalized documentation typos
✅ Pull Request Checklist:

[x] Included link to corresponding React Spectrum GitHub Issue.
[ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
[ ] Filled out test instructions.
[x] Updated documentation (if it already exists for this component).
[ ] Looked at the Accessibility Practices for this feature - Aria Practices

🧢 Your Project:
Adobe Globalization team - internal I18n audit

GET_BUILD

GET_BUILD