sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: [BUG] Image component with fill and contain should set max-width and max-height, not width and height
Labels: bug,Image (next/image)

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro N
    Binaries:
      Node: 16.17.1
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.9
      eslint-config-next: 13.4.9
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Image optimization (next/image, next/legacy/image)

### Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/nostalgic-frost-kstrfj?file=%2Fpages%2Findex.js%3A25%2C32

### To Reproduce

CodeSandBox: https://codesandbox.io/p/sandbox/nostalgic-frost-kstrfj?file=%2Fpages%2Findex.js%3A14%2C8-29%2C13 

Live:  https://kstrfj-3000.csb.app/


```js
<div
  style={{
    width: "100px",
    height: "100px",
    position: "relative",
  }}
>
  <Image
    src="https://res.cloudinary.com/jerrick/image/upload/v1682412853/6447953565c86d001de9aa14.jpg"
    fill
    style={{
      objectFit: "contain",
      borderRadius: "15px",
    }}
  />
</div>
```

### Describe the Bug

When using `fill`, next enforces `width: 100%` and `height: 100%`, trying to change those via the `style` prop will result in an error indicating that they can't be changed.

The issue is, when `width` and `height` are set at `100%`, and `objectFit:"contain"` is set, the `<img>` html tag will stretch to fill the the parent container while the image itself will be contained in that parent and not necessarly touching all edges (happens when the image has an aspect ratio that's different than the parent container).

This would then result in broken borderRadius.

Instead of setting `width: 100%` and `height: 100%`, I think next should set  `maxWidth: 100%` and `maxHeight: 100%` (or at least allow us to overwrite the width and height properties) which would fix this issue. 

# Here are the visual differences between the two:
### With `width` and `height` (notice how the `img` tag stretches to fill the whole container but the image it self doesn't):

![image](https://github.com/vercel/next.js/assets/94167701/376ecea3-f87a-4f11-b305-5de07ecae0e4)


### With `max-width` and `max-height` + transform to center the image within the container.
![image](https://github.com/vercel/next.js/assets/94167701/f4b350c5-408b-4021-a7cf-ac48a63e4748)



### Expected Behavior

There should be a way to contain an image in parent and at the same time be able to set `border-radius` property on the image.

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: rust
Issue: Regression in global_allocator when using prefer-dynamic on 1.71.0 and above
Labels: A-linkage,P-medium,A-allocators,T-compiler,regression-from-stable-to-stable,C-bug,-Cprefer-dynamic

Since 1.71.0 a regression has been added into the compiler causing segmentation faults in applications compiled using `prefer-dynamic`, this issue is not present in 1.70.0. It appears that the system allocator is still being used in some cases causing segmentation faults.

### Code

https://github.com/alexkornitzer/dylib-errors/tree/error/jemalloc

```
use jemallocator::Jemalloc;

#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;

fn main() {
    let a = std::thread::spawn(move || {});
    a.join().unwrap();
    println!("didn''t crash");
}
```

### Version it worked on

It most recently worked on: 1.70.0

### Version with regression

1.71.0

Have run git bisect and the regression was introduced with the following commit: a2b1646c597329d0a25efa3889b66650f65de1de
Repository: godot
Issue: cant use any function that calls get_world_3d in a thread
Labels: topic:core

### Godot version

v4.1.stable.mono.official [970459615]

### System information

windows 10

### Issue description

error:
`E 0:00:02:0575   get_world_3d: This function in this node (/root/Node3D/GridMap) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
  <C++ Error>    Condition "!is_readable_from_caller_thread()" is true. Returning: (Ref<World3D>())
  <C++ Source>   scene/3d/node_3d.cpp:738 @ get_world_3d()`
the game instantly crashed whenever a function that calls get_world_3d is used.

### Steps to reproduce

use any function that calls get_world_3d inside a thread

### Minimal reproduction project

N/A
Repository: go
Issue: os: (*Cmd).Wait hangs on macOS when setctty is used after commit b15c399a3
Labels: OS-Darwin,NeedsInvestigation

A test that involves setting the command's TTY with the code below, and then calling `(*Cmd).Wait`, started timing out on macOS in Go 1.20.

```
func SetCtty(cmd *exec.Cmd, tty *os.File) {
	cmd.SysProcAttr = &syscall.SysProcAttr{
		Setctty: true,
		Setsid:  true,
		Ctty:    3,
	}
	cmd.ExtraFiles = []*os.File{tty}
}
```

I bisected it down to b15c399a36a38509ae56dd69670974566f7b0d52.

```
commit b15c399a36a38509ae56dd69670974566f7b0d52
Author: Yuval Pavel Zholkover <paulzhol@gmail.com>
Date:   Sat Jul 30 20:41:58 2022 +0300

    os: only add file descriptors which are set to non-blocking mode to the netpoller

    Either ones where kind == kindNonBlock or those we've successfully called syscall.SetNonblock() on.
    Restore blocking behavior if we detect an error registering with the netpoller and our flow was
    successful in setting the inital syscall.SetNonblock().

    Update #54100

    Change-Id: I08934e4107c7fb36c15a7ca23ac880490b4df235
    Reviewed-on: https://go-review.googlesource.com/c/go/+/420334
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Run-TryBot: Yuval Pavel Zholkover <paulzhol@gmail.com>
    Reviewed-by: Than McIntosh <thanm@google.com>
    Auto-Submit: Ian Lance Taylor <iant@golang.org>

 src/os/file_unix.go | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)
```

You can see the failing tests in the CI of rogpeppe/go-internal#172 (https://github.com/rogpeppe/go-internal/actions/runs/5005273594?pr=172) or in age's tests (https://github.com/FiloSottile/age/actions/runs/5633140339/job/15261730363).

/cc @paulzhol @ianlancetaylor @dmgk #54100
Repository: godot
Issue: `InvalidCastException` is thrown when trying to assign a c# resource to a tool Node in editor
Labels: topic:dotnet

### Godot version

v4.2 dev.mono 16a93563b

### System information

Godot v4.2.dev.mono (16a93563b) - Windows 10.0.19045 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics 630 (Intel Corporation; 31.0.101.2121) - Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz (12 Threads)

### Issue description

`InvalidCastException` thrown when trying to assign a c# resource to a tool Node in editor.
Actually this bug has been here since c# Resource is supported.

The exception stack:
```
D:/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs:112 - System.InvalidCastException: Unable to cast object of type 'Godot.Resource' to type 'CSharpResource'.
     at CSharpNode.SetGodotClassPropertyValue(godot_string_name& name, godot_variant& value) in D:\csres\Godot.SourceGenerators\Godot.SourceGenerators.ScriptPropertiesGenerator\CSharpNode_ScriptProperties.generated.cs:line 13
     at Godot.Bridge.CSharpInstanceBridge.Set(IntPtr godotObjectGCHandle, godot_string_name* name, godot_variant* value) in D:\godot\modules\mono\glue\GodotSharp\GodotSharp\Core\Bridge\CSharpInstanceBridge.cs:line 57
```

### Steps to reproduce

1. Make a new scene with a single `Node` Node
2. Declare a new c# resource class:
```cs
using Godot;
[GlobalClass]
public partial class CSharpResource : Resource
{
    // some props...
    [Export] public int AInt { get; set; }
}
```
3. Attach a c# script named `CSharpNode.cs` with a `CSharpResource` property and tool enabled(necessary) to the Node:
```cs
using Godot;
[GlobalClass, Tool]
public partial class CSharpNode : Node
{
    [Export] CSharpResource MyRes { get; set; }
}
```
4. Reopen the scene to make `Tool` works.
5. Assign a CSharpResource to the `MyRes` property.
6. Then the exception is thrown.

### Minimal reproduction project

[csres.zip](https://github.com/godotengine/godot/files/12267539/csres.zip)
Repository: godot
Issue: UI Becomes unresponsive if scene isn't saved after "Save Scene As..." menu shows and "Cancel" is clicked
Labels: bug,topic:editor

### Godot version

* v4.1.1.stable.official [bd6af8e0e]
* v4.2.stable.official [46dc27791]

### System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Mobile) - dedicated AMD Radeon RX 6700 XT (Advanced Micro Devices, Inc.; 31.0.14037.17019) - AMD Ryzen 7 2700 Eight-Core Processor (16 Threads)

### Issue description

When creating a new scene and then adding a node, when I move focus to a new application (Chrome for example), the "Save Scene As..." popup and if I click "Cancel" the editor becomes unresponsive.

It acts as if the save scene modal is still open. I then have to restart Godot by opening the task manager and force quit.

### Steps to reproduce

* Create a new scene (without saving)
* Add a node to the scene
* Move focus to another app such as Chrome
* The "Save Scene As..." menu shows up automatically
* Press "Cancel"
* Try to click on something within the editor

### Minimal reproduction project

[Test.zip](https://github.com/godotengine/godot/files/12267641/Test.zip)
Repository: storybook
Issue: [Bug]: addon-actions action handler not assignable to async callback props
Labels: bug,good first issue,help wanted,addon: actions,has workaround,sev:S3

### Describe the bug

When the `action` function is used for an async callback property a type error occurs e.g.

 
![image](https://github.com/storybookjs/storybook/assets/13420359/e7225d89-e170-46e3-bf25-4f61e29fa7c0)


### To Reproduce

Stackblitz reproduction: https://stackblitz.com/edit/github-u61rhv?file=stories%2FButton.stories.ts



### System

```shell
Environment Info:

  System:
    OS: Windows 10 10.0.22621
    CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
  Binaries:
    Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.2.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 115.0.5790.110
    Edge: Spartan (44.22621.1992.0), Chromium (115.0.1901.188)
  npmPackages:
    @storybook/addon-essentials: ^7.2.0 => 7.2.0 
    @storybook/addon-interactions: ^7.2.0 => 7.2.0 
    @storybook/addon-links: ^7.2.0 => 7.2.0
    @storybook/blocks: ^7.2.0 => 7.2.0
    @storybook/nextjs: ^7.2.0 => 7.2.0
    @storybook/react: ^7.2.0 => 7.2.0
    @storybook/testing-library: ^0.2.0 => 0.2.0
```


### Additional context

I think its a case of setting the return type for the HandlerFunction here https://github.com/storybookjs/storybook/blob/next/code/addons/actions/src/models/HandlerFunction.ts to `any` (`unknown` or 
`void|Promise<void>` doesnt work)
Repository: PowerToys
Issue: File Explorer - Need to define globally the default view
Labels: Needs-Triage,Needs-Team-Response,Resolution-Built into Windows

### Description of the new feature / enhancement

MS File Explorer has a definable directory/folder view, but it isn't global and it, "fixes itself" when moving to different directories or adding new directories/folders.  It appears to be controlled by the "folder type."  Perhaps I'm deficient, but what defines a folder type, and who cares? This has been a problem for several years.  I personally like "Details" with filename extensions in all displays.  Why can't I set this once, specify ALL directories/folders on a disk drive and have the setting, "stick" even for new directories/folders no matter the content of the directory/folder?  

"Badges, we don't need no stinking badges."  Or, in my case, icons.

### Scenario when this would be used?

I am constantly creating new directories/folders and dragging and dropping files into them, and then having to define their "view."  There are days when I go through this view definition at least ten times.  I need a single definable default view for all directories/folders.  Of course, the default could be manually changed  

### Supporting information

_No response_
Repository: godot
Issue: MeshInstance.GetAABB().Size is incorrect with fbx meshes
Labels: bug,needs testing,topic:import,topic:3d

### Godot version

4.1.1

### System information

Godot v4.1.1.stable.mono - Manjaro Linux #1 SMP PREEMPT Tue Jul 25 07:09:46 UTC 2023 - Vulkan (Forward+) - dedicated NVIDIA GeForce MX150 (nvidia; 535.86.05) - Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 Threads)

### Issue description

MeshInstance.GetAABB().Size returns bounds, that is not no longer applyable to global transform
By raw logic, the X of the mesh multiplied by index will give as result the (x*n).length
Well, now for n=6 total length of drawable space is less, than (x/2).
For previous versions of engine GetAABB has returned normal sizes, that are rendered nice withing sipmle for loop.

### Steps to reproduce

1.
```
public partial class Base : Node3D {
        [Export]
        public MeshInstance3D HexagonMesh;
        public Vector2 GetSize() {
            Aabb bounds = HexagonMesh.GetAabb();
            return new(bounds.Size.X, bounds.Size.X);  //bullshit is here <-----------------------
        }
    }
```
2.

```
    public class Map {

        readonly private PackedScene baseTile = ResourceLoader.Load<PackedScene>(
            "res://some/node.tscn"
        );
        readonly private Vector2 tileSize;
        public Example() {
            Base instance = baseTile.Instantiate<Base>();
            tileSize = instance.GetSize(); //bullshit is here <-----------------------
        }
        public void Generate(Node3D root, Vector2 size)  {
            float cos30Rad = Godot.Mathf.Cos(Godot.Mathf.DegToRad(30));
            float halfTileSize = tileSize.Y/2;
            for (short x = 0; x < size.X; x++) {
                Vector2 pos = Vector2.Zero;
                pos.X = x * tileSize.X;
                pos.Y = x % 2 == 0 ? 0 : halfTileSize;
                for (short z = 0; z < size.Y; z++) {
                    Node3D tile = GenerateNodeAt();
                    root.AddChild(tile);
                    tile.GlobalTranslate(new(pos.X, 0, pos.Y));
                    pos.Y += tileSize.Y;
                }
            }
        }
    }
```

### Minimal reproduction project

https://github.com/hehexgame/POI
Repository: godot
Issue: Detaching a Script from a Node Produces Neither Warning nor Confirmation of the Action
Labels: enhancement,topic:editor,usability

### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Compatibility) - NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.14.7311) - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)

### Issue description

Many destructive actions provide you with a confirmation dialog.  However, the "detach script" function does not seem to be one of them.  The script will get _silently_ detached from the selected node _without any warning or confirmation_.

Suggest that either a warning or a confirmation of the action be provided.  This is because an errant click can cause detachment and you might not notice it quickly enough to easily perform an Undo to resolve the issue.

### Steps to reproduce

Simply press **[Detach the script from the selected node.]** on a node with a script attached.

### Minimal reproduction project

N/A
Repository: godot
Issue: Modal Dialogs Should not have Minimize Functionality
Labels: bug,topic:core,topic:gui

### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Compatibility) - NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.14.7311) - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)

### Issue description

(This is similar to [https://github.com/godotengine/godot/issues/62668](https://github.com/godotengine/godot/issues/62668))
Modal dialogs block users from getting to their parent windows (whatever is "behind" the modal dialog).  However, in Godot, If a user _Minimizes_ a modal dialog, they are left looking at an interface that appears to be broken.  For example, doing this while the editor is active will leave the user looking at a blinking caret that seems to ignore all keyboard input.

Pressing anything that would activate the default Cancel command (**`<ESC>`**) or something that should trigger the default button (**`<ENTER>`**) does nothing.  

You can get the dialog to restore by _Minimizing_ and _Restoring_ Godot's main window, e.g. clicking on Godot's taskbar button to minimize and restore it, but if a user's taskbar is hidden by default, it might take them some time to figure things out.  You can also click **[Minimize]** on Godot's main window, but a parent window should be disabled, **even its caption buttons**, when a child modal dialog is visible (that is another small bug).

This behavior (allowing _Minimize_ actions on a secondary modal dialog) is also counter to most other Windows apps out there.

The _Minimize_ function should be **removed** from any secondary **modal** dialogs.

### Steps to reproduce

With a project loaded, select any destructive operation that will cause a confirmation dialog to appear, and activate the _Minimize_ functionality from either the Window Menu (by clicking the Godot icon in corner of the dialog) or pressing **[Minimize]** on the dialog's caption bar.  You will then see the effect described above.

For example, load a project, open the script editor, and click into it so that the caret is visible and blinking.  Select a Node in the tree and press **`<DELETE>`**.  Note that while the confirmation dialog is visible, the caret in the editor is hidden.  Now _Minimize_ the confirmation dialog.  Note that the caret becomes visible again and it looks like you are interacting with a normal, enabled interface, but **nothing will work**.  

Minimize and Restore the Godot main window and the confirmation dialog becomes visible again.

### Minimal reproduction project

N/A
Repository: excalidraw
Issue: Missing CODE_OF_CONDUCT
Labels: documentation

Hi everyone 👋,
I just noticed that the Code of conduct.md file is missing

Best regards
NH
Repository: transformers
Issue: Support H100 training with FP8 in Trainer and Deepspeed
Labels: trainer,Feature request,DeepSpeed

### Feature request

Support H100 training with FP8 in Trainer and Deepspeed

### Motivation

FP8 should be much faster than FP16 on supported Hopper hardware. Particularly with Deepspeed integration @stas00

### Your contribution

Happy to help in any way that I can.
Repository: angular
Issue: use useFactory or analog for every inject
Labels: area: core,core: di,canonical

### Which @angular/* package(s) are relevant/related to the feature request?

core

### Description

If we use `{ provide: MyService, useFactory: () => new MyService() }` then `new MyService()` is executed once per module. It would be nice to have a `useFactoryPerInject` that runs `new MyService()` for each injection.

This is most often needed to move unsubscribe logic from the component to the service injected into the component. So we can use `DestroyRef` for our myService instance within the instance itself, or (possibly) use `takeUntilDestroyed` at this place. Of course whole logic except unsubscription logic of our service will be static.

### Proposed solution

Use `{ provide: MyService, useFactoryPerInject: () => new MyService() }` inside providers (e.g. module providers)
or `@Injectable({provideIn:  'elementInjector'})` as service decorator.

### Alternatives considered

There are no alternatives, unfortunately. The only solution is to create instances by `providers: [MyService]` for each component, but this we need to do it for the Application layer.
Repository: flutter
Issue: [google_maps_flutter] Polygon documentation inconsistent with underlying platform
Labels: platform-android,d: api docs,p: maps,package,team-ecosystem,P2,triaged-ecosystem

### Is there an existing issue for this?

- [X] I have searched the [existing package issues](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Apackage)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### What package does this bug report belong to?

google_maps_flutter

### What target platforms are you seeing this bug on?

Android

### Have you already upgraded your packages?

Yes

### Dependency versions

`google_maps_flutter: ^2.4.0`

### Steps to reproduce

When adding a Polygon to the map that has its holes parameter defined, I found that the fill color would not be used to display the Polygon, instead it would be rendered with transparent fill. After much searching I found this one page of Android documentation that tells me why the fill color was not being applied.

https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Polygon

The comments on `fillColor` should be updated to match and perhaps other documentation from this page.

### Expected results

Expected the documentation to lead me to understand why my code was not working

### Actual results

The documentation was missing vital information

### Code sample

N/A

### Screenshots or Videos

N/A

### Logs

N/A

### Flutter Doctor output

N/A