sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Tracking Issue for `const` checked slice to `str` conversions
Labels: T-libs-api,C-tracking-issue,disposition-merge,finished-final-comment-period

<!--
Thank you for creating a tracking issue!

Tracking issues are for tracking a feature from implementation to stabilization.

Make sure to include the relevant RFC for the feature if it has one.

If the new feature is small, it may be fine to skip the RFC process. In that
case, you can use use `issue = "none"` in your initial implementation PR. The
reviewer will ask you to open a tracking issue if they agree your feature can be
added without an RFC.
-->

Feature gate: `#![feature(const_str_from_utf8)]`

This is a tracking issue for `str::{from_utf8, from_utf8_mut}` and `str::Utf8Error::{valid_up_to, error_len}` as `const fn`

<!--
Include a short description of the feature.
-->

### Public API

<!--
For most library features, it'd be useful to include a summarized version of the public API.
(E.g. just the public function signatures without their doc comments or implementation.)
-->

```rust
// core::str

pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error>;
```

### Public API (stabilized in Rust 1.63)


```rust
// core::str

pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error>;

impl Utf8Error {
    pub const fn valid_up_to(&self) -> usize;
    pub const fn error_len(&self) -> Option<usize>;
}
```

### Steps / History

<!--
For larger features, more steps might be involved.
If the feature is changed later, please add those PRs here as well.
-->

- [x] Implementation: #90607
- [x] Final comment period (FCP) (`&` functions)
- [x] Stabilization PR (`&` functions)
- [ ] Final comment period (FCP) (`&mut` function)
- [ ] Stabilization PR (`&mut` function)

<!--
Once the feature has gone through a few release cycles and there are no
unresolved questions left, the feature might be ready for stabilization.

If this feature didn't go through the RFC process, a final comment period
(FCP) is always needed before stabilization. This works as follows:

A library API team member can kick off the stabilization process, at which point
the rfcbot will ask all the team members to verify they agree with
stabilization. Once enough members agree and there are no concerns, the final
comment period begins: this issue will be marked as such and will be listed
in the next This Week in Rust newsletter. If no blocking concerns are raised in
that period of 10 days, a stabilzation PR can be opened by anyone.
-->

### Unresolved Questions

<!--
Include any open questions that need to be answered before the feature can be
stabilised. If multiple (unrelated) big questions come up, it can be a good idea
to open a separate issue for each, to make it easier to keep track of the
discussions.

It's useful to link any relevant discussions and conclusions (whether on GitHub,
Zulip, or the internals forum) here.
-->

- None yet.
Repository: storybook
Issue: Add play function to CLI template
Labels: feature request,cli,addon: interactions

To demonstrate use of play functions & interactions:
- [x] React
- [x] Vue
- [x] Vue3
- [x] HTML
- [ ] Web-components
- [x] Angular
- [x] Preact
- [x] Svelte
Repository: rust
Issue: `black_box(&x)` prevents emitting a constant return value, but it shouldn't
Labels: A-LLVM,I-slow,A-codegen,T-compiler,C-bug

Another form of the same issue AFAICT: #86510

On latest nightly, `black_box(&x)` prevents codegenning a constant return value, but it shouldn't.

This is possibly because of over pessimism about interior mutability, but we should be able to tell whether a type is interior mutable or not.

[Godbolt](https://rust.godbolt.org/z/qcTYa78Ej)

```rust
#![feature(bench_black_box)]

use std::hint::black_box;

pub fn foo() -> i32 {
    let x = 1;
    black_box(&x);
    x
}
```

The return instruction moves from a location on the stack:

```asm
        mov     eax, dword ptr [rsp + 4]
```

Whereas for this:

```rust
#![feature(bench_black_box)]

use std::hint::black_box;

pub fn foo() -> i32 {
    let x = 1;
    let y = x;
    black_box(&y);
    x
}
```

It optimizes correctly.

```asm
        mov     eax, 1
```



<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"jmintb"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: electron
Issue: [Feature Request]: Support for switching context menu immediately, like it happens with native menubars
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

For the Windows version of my app I'm using a custom menubar, the only problem I have with that is that I want to use native menus for the menubar, otherwise the app wouldn't feel good IMO, but I think currently the only way I have to implement the switch to adjacent context menus when moving the cursor is by closing the current one and opening the new one, which has an animation associated with it, which makes the whole menubar just feel weird compared to native ones.

Since a video is worth a thousand+ words (this is recorded on macOS, which also has this problem, but on macOS ~nobody ships apps with custom menubars, this problem is mainly Windows-only really):

https://user-images.githubusercontent.com/1812093/142422539-56410577-c22c-4300-a3b2-e6bf87bbfb58.mp4




### Proposed Solution

Maybe an option could be added to Menu#popup to open it immediately (and implicitly close the previous one immediately).

### Alternatives Considered

Not using native menus, which would fix the animation but break what people expect menus to look like, and it's not just looks, native menus behave differently than custom ones, like they can be drawn outside the boundaries of the window too, which is cool.

### Additional Information

_No response_
Repository: godot
Issue: GDScript 2.0: Error when a node name is an integer and you try to fetch it via a script
Labels: enhancement,topic:gdscript

### Godot version

4.0.dev 15062513c01a835f59d9c905e5e65a7002d6c370

### System information

Linux binogure 5.14.0-2-amd64 #1 SMP Debian 5.14.9-2 (2021-10-03) x86_64 GNU/Linux

### Issue description

GDScript raises an error when a node name is an integer and you try to fetch it via a script
![image](https://user-images.githubusercontent.com/6616005/142424477-bb427210-2cf8-4c27-9bd7-d93dd35ae7a5.png)


### Steps to reproduce

Create a scene, and add any type of node as a child, then name that node `1`, attach a script to the main node, and try the following code:
```gdscript
func _ready:
  $1.get_name()
```

### Minimal reproduction project

_No response_
Repository: godot
Issue: VisualInstance(s) are spamming the VisualServer with useless updates on low FPS
Labels: enhancement,topic:rendering,performance

### Godot version

45088780be124acc8ab226d3e5cee808bb626980

### System information

OS: Arch Linux, CPU: Ryzen 5, GUP: RX 480

### Issue description

VisualInstance(s) notify the VisualServer through the command queue (if MT is enabled) that the transform has changed whenever the transform notifications are flushed, which happens every physics frame. This means that if the rendering framerate is lower than the physics frame rate, the VisualServer will receive many useless notifications making things worse.

Here is the perf flame graph for the current implementation:

![Screenshot_20211118_132548](https://user-images.githubusercontent.com/5478365/142425866-3532abcb-84b9-4e52-8d0c-00b33be5a924.png)

Here is the time spent notifying the visual server of the current implementation:
![Screenshot_20211118_133019](https://user-images.githubusercontent.com/5478365/142426046-ddba8da2-2574-4389-8079-33b273069297.png)

Here is the flame graph for an optimized implementation that uses an internal flag and only notifies the VisualServer on the "internal process" notification:
![Screenshot_20211118_132651](https://user-images.githubusercontent.com/5478365/142426262-83bf6925-1dd5-42d7-8eeb-27d335bb82fa.png)

Here is the time spent notifying the visual server with the same optimization as before:
![Screenshot_20211118_133127](https://user-images.githubusercontent.com/5478365/142426418-0fefb732-b37d-41bd-a386-3633f840a837.png)

That's around 2% speedup on the main thread, but considering that the benchmark I'm using is dominated by scripting and physics, and there aren't that many visual instances, it could be much more in some other cases.


### Steps to reproduce

The best way to reproduce this is to add rigid bodies to the scene with child mesh instances while profiling.
Add enough of them, and the rendering FPS will drop below the physics FPS.
Profiling with perf will show the issue.

### Minimal reproduction project

_No response_
Repository: excalidraw
Issue: Proposal to show coloured canvas action buttons and better UI states
Labels: discussion,UX/UI

With publish library feature, we have moved away from gray icon buttons inside library
<img width="418" alt="Screenshot 2021-11-18 at 8 06 08 PM" src="https://user-images.githubusercontent.com/11256141/142435705-9b1eff51-051a-4469-a2bb-53e3d61788ad.png">

We need to come up with a palette for other buttons / icons as well. The gray probably looks bit dull.

Something like 👇🏻 for canvas actions (delete and load should be same as inside library for consistency)
<img width="267" alt="Screenshot 2021-11-18 at 8 07 32 PM" src="https://user-images.githubusercontent.com/11256141/142435944-4f1bcf91-fc04-4354-9ff5-40491abdd126.png">

Currently the active states are not clear as we just darken the color gray to show active state.

Current
<img width="574" alt="Screenshot 2021-11-18 at 8 34 17 PM" src="https://user-images.githubusercontent.com/11256141/142440801-68da5946-9787-421e-a85e-62e0ac6e01bf.png">

Active states could be shown by inverting the colors to make it more clear ?

Proposed
<img width="586" alt="Screenshot 2021-11-18 at 8 33 09 PM" src="https://user-images.githubusercontent.com/11256141/142440622-56a5c361-80ba-4ba1-a4ec-cbd1b3aa7ada.png">
Repository: material-ui
Issue: [docs] Some API descriptions require horizontal scroll to be read in full
Labels: docs,component: checkbox,component: pickers

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Some API docs require horizontal scroll to see the full (or _any_ in some cases) API descriptions, including Checkbox and Pickers.

See, for example:

https://github.com/mui-org/material-ui/blob/9387b52a3423db0889a79f4e2fee577ab2265dd1/packages/mui-material/src/Checkbox/Checkbox.d.ts#L94-L98

When we look at the docs page, it's not rendering the same note. However, when we go to "edit this page", it just points right back to the code docs. https://mui.com/api/checkbox/

### Expected behavior 🤔

https://mui.com/api/checkbox/ should be updated to be more clear that this value gets converted to a string. Bonus points for explaining why this is so important, and how you might need to work around it.

### Steps to reproduce 🕹

N/A

### Context 🔦

_No response_

### Your environment 🌎

N/A
Repository: godot
Issue: Change scene on InputEventJoypadMotion in _input(event) disconnects joy controller
Labels: bug,needs testing,topic:input

### Godot version

v3.4.stable.arch_linux

### System information

Arch Linux 5.15.2-arch1-1

### Issue description

If i call on change_scene() in _input(event): if event is InputEventJoypadMotion the controller disconnects.

```
func _input(event):
	if event is InputEventJoypadMotion:
		get_tree().change_scene("res://Scene.tscn")
```
It don't happens on InputEventJoypadButton. And if i add a Timer before the change the controller stays connected.

I have a Global scene that is autoloaded to monitor controllers.


### Steps to reproduce

Run project and press an analog input on your controller and joy_connection_changed() will print out the device that disconnected.

### Minimal reproduction project

[Controllerbug.zip](https://github.com/godotengine/godot/files/7564728/Controllerbug.zip)
Repository: material-ui
Issue: [TextField] OutlinedInput does not pass "style" props to NotchedOutline
Labels: new feature,component: text field

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

I want to change the style of the "fieldset" of the NotchedOutline component but OutlinedInput does not pass that props:
![image](https://user-images.githubusercontent.com/15874591/142467154-5bf9d02b-b873-427a-84e9-268b49101d64.png)


### Expected behavior 🤔

Be able to pass style props from OutlinedInput to NotchedOutline.

### Steps to reproduce 🕹

_No response_

### Context 🔦

_No response_

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: flutter
Issue: Refactor the Android font manager
Labels: c: new feature,platform-android,engine,dependency: skia,a: typography,dependency: android,P3,team-android,triaged-android

Today, the engine needs expat solely for the purpose of parsing `fonts.xml`, which is an unstable file that is documented as something that you're not supposed to use. Unfortunately, Android does not provide us with a better API for this.

Then, it needs to open and scan every font listed in that file, sometimes multiple times over, to get specific information for each listing. On low end phones, this can take significant amounts of time (~750ms on an internally used low end Android phone). We work around this by early-initializing the font manager on a background thread and delaying the check for it until as late as possible, but as VM startup gets more efficient this can easily become the long pole again. It also generates a lot of bus contention on every single startup of the app.

Ideally, there would be an Android API that does better for us, e.g. providing a sytem-wide cache of font data that it knows how to keep up to date. Alternatively, there would be some kind of Freetype API that could more efficiently scan fonts a single time and get all the information, or there would be some good way for Flutter applications to persist and invalidate a cache for fonts data as needed. It also might be worth looking at lazily loading at least some font data, e.g. not loading CJK related fonts if the system locale is not CJK (those fonts tend to be larger and take longer to parse/process).

So the wins would be:

 - About 50kb of binary size from expat, as well as removing a dependnecy we have to roll.
 - Less contention around app startup on the IO bus and freeing up a thread for other work that has to get done
 - Chrome has to do the same thing as us and they would benefit from a solution for this 

@bungeman tells me this is non-trivial to do and existing Android APIs are pretty lacking.

/cc @jason-simmons @zanderso @blasten
Repository: flutter
Issue: Allow intercepting and wrapping ModalBarrier
Labels: framework,f: routes,f: gestures,customer: crowd,a: platform-views,platform-web,P2,team-web,triaged-web

[ModalBarrier](https://api.flutter.dev/flutter/widgets/ModalBarrier-class.html) is used to prevent interactions with widgets appearing behind it. However, on the web, if the widget behind the modal barrier contains a platform view, the platform view will still receive the raw pointer events. Flutter preventing interactions at hit testing or gesture level is not sufficient to prevent the platform views from doing their own hit testing and gesture detection. An extreme case is iframes, where the browser will completely swallow the pointer event such that only the iframe processes it (this is done due to security and privacy policies).

To prevent pointer events from landing on platform views @ditman built [package:pointer_interceptor](https://pub.dev/packages/pointer_interceptor). Developers can use it in specific cases. However, in a large app it is hard in practice to find all cases that need a pointer interceptor. The author of the widget that contains a platform view is the one who knows that a pointer interceptor is needed, but the author of the widget that's rendered as an overlay with a modal barrier may not (in large organizations the authors may not be the same people or even the same teams). This causes bugs to creep into apps unnoticed.

The proposal is for `ModalBarrier` to support a shared callback supplied via an `InheritedWidget` that can be used to wrap the barrier in a platform interceptor. This would allow the author of the platform view to make sure that their platform view does not receive pointer events when overlaid by other widgets. The author of the modal widget does not need to be aware of it at all.

This request came from a Google customer (see internal issue b/205179054).

/cc @ditman @goderbauer
Repository: create-react-app
Issue: Add Docker in development and production modes
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?
No

### Describe the solution you'd like
I'd like to add the Dockerfile and Docker-compose and also Nginx configuration files into the base app template to be able run the application into the Docker env. **What do you think?**
Repository: pytorch
Issue: `torch.unique_consecutive`: passing positional optional arguments results in empty tensors
Labels: triaged,module: sorting and selection

## 🐛 Bug

Passing `True` for either `return_inverse` or `return_counts` (but not both!) as **a positional argument** to `torch.unique_consecutive` results in an empty second return value.

To clarify, the issue occurs when I do:

``` python3
>>> torch.unique_consecutive(torch.ones(5), True)
(tensor([1.]), tensor([], dtype=torch.int64))
>>> torch.unique_consecutive(torch.ones(5), False, True)
(tensor([1.]), tensor([], dtype=torch.int64))
```
but not for
``` python3
>>> torch.unique_consecutive(torch.ones(5), True, True)
(tensor([1.]), tensor([0, 0, 0, 0, 0]), tensor([5]))
>>> torch.unique_consecutive(torch.ones(5), return_inverse=True)
(tensor([1.]), tensor([0, 0, 0, 0, 0]))
>>> torch.unique_consecutive(torch.ones(5), return_counts=True)
(tensor([1.]), tensor([5]))
```
FWIW, the `torch.Tensor.unique_consecutive` version seems to be OK in all cases:
``` python3
>>> torch.ones(5).unique_consecutive(True)
(tensor([1.]), tensor([0, 0, 0, 0, 0]))
>>> torch.ones(5).unique_consecutive(False, True)
(tensor([1.]), tensor([5]))
```
Repository: go
Issue: x/build: OpenBSD 7.0 386 builder is slow
Labels: Builders,NeedsInvestigation

I am about 80% sure that the OpenBSD builders, both 6.8 and 7.0, are timing out running all.bash. We have a hard [30 minute limit](https://cs.opensource.google/go/x/build/+/master:buildlet/gce.go;l=51;drc=0be17ea117f2262bad4e235a43e198f8e06edcee) on build VMs, and the OpenBSD builders take slightly longer than that to run all.bash from scratch. However, they write a snapshot of the distribution after it's built, and reusing that saves enough time for the build to succeed upon retry -- that's why the dashboard is relatively clean-looking.

This is wasteful. We should probably increase the timeout so that the build finishes, prevent the retry, or modify the OpenBSD tests somehow to run in a more reasonable amount of time.

cc @golang/release @4a6f656c
Repository: flutter
Issue: [Docs] FractionallySizedBox has weird functionality in Rows and Columns
Labels: framework,d: api docs,a: layout,P2,team-framework,triaged-framework

## Motivating issue
I want a column with four boxes that together take up half the screen and one extra box below it of 20 pixels. One might use a `Column` with 4 `FractionallySizedBoxes` with `heightFactor: 0.125` and one `SizedBox` of 20px.
Expected behavior: The total column height is 0.5 screen_height + 20.
Actual behavior: The total column height is 0.125 +/- 20.

![image](https://user-images.githubusercontent.com/36284839/142494568-27f84161-8550-4bfc-bc94-3f23f2fcb34b.png)
The image above shows it more simply. Two `heightFactor: 0.5` FractionallySizedBoxes should render as 1.0 of height (100% of height). But, the boxes get shrunk to 0.25 height when there are 2. And then to 1/3, 1/4, 1/5 each as more are added. (Try it: see [dartPad](https://dartpad.dev/?id=0d97a4202a0cd8838aa25713f1c19c13&null_safety=true) )

FractionallySizedBox works well in many places for sizing a box relative to it's parent. However, when using Columns and Rows, the name of the box is misleading.

## RECOMMENDATION
Add documentation to discourage use of FractionallySizedBox in Columns and Rows.
Remove the "wrap it in a Flexible widget" recommendation in the video

Longer term, consider making a (separate?) widget that gives the desired effect.

## Details
Putting a FractionallySizedBox in a Column directly doesn't work at all (render error). [One gets a "Box Constraints force infinite width" error](https://stackoverflow.com/questions/57242651/using-fractionallysizedbox-in-a-row). The video says "wrap it in a Flexible" so that it works right. But this is *very* misleading.

What actually happens when wrapping it in a Flexible seems to be that it adjusts the flex factor in a way that generates the effect mentioned above: it applies the `heightFactor` to the _whole column_, not the individual box.

I made a Dartpad (https://dartpad.dev/?id=0d97a4202a0cd8838aa25713f1c19c13&null_safety=true) to demonstrate this effect.

And, there are screenshots and details in my stackOverflow answer: https://stackoverflow.com/questions/57242651/using-fractionallysizedbox-in-a-row/70026340#70026340

### Workarounds
Use Flexible and flex factors and media queries to achieve the desired effect.
Or, position these boxes as individual items in a Stack.
Repository: PowerToys
Issue: Option to disable Ctrl + Alt = AltGr on International Keyboards
Labels: Idea-Enhancement,Product-Keyboard Shortcut Manager

### Description of the new feature / enhancement

The keyboard shortcuts inconsistency on Windows is a real productivity issue and I don't know how that's possible in 2021. 
While we have the great Keyboard Manager with remapping capabilities, which is great to finally help me write faster, it does not help with an incredibly old and irritating issue from Windows, [explained in this post](https://superuser.com/questions/592970/can-i-make-ctrlalt-not-act-like-altgr-on-windows).

A lot of apps use the Ctrl + Alt + 1 or 2 or 3 or 4 or 0 to quickly convert to a corresponding level header or revert to normal text. Even OneNote does it. (Except reverting to normal text is Ctrl + Shift + N: why ??)

But on international keyboards, Ctrl + Alt is associated to AltGr so instead of creating a 2nd level header, I get a lame "~" character. 

There is no workaround other than creating a custom Keyboard Layout + using a AutoHotKey remapping. 

### Scenario when this would be used?

Non US keyboards + any shortcut using Ctrl + Alt + X 

### Supporting information

https://answers.microsoft.com/en-us/msoffice/forum/all/disable-ctrlalt-altgr/78fff2b4-c20c-4408-9547-e323114ae522?auth=1

(didnt help)

https://superuser.com/questions/217082/why-dont-the-google-docs-ctrl-alt-shortcuts-work

https://superuser.com/questions/592970/can-i-make-ctrlalt-not-act-like-altgr-on-windows