sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: svelte
Issue: support abortcontroller / abortsignal to all event handler / life hooks
Labels: awaiting submitter

### Describe the problem

when leaving the current page in a SPA, i would like to clean things up myself, using `onDestroy` works great for such wonders.
But if i'm finish with that listener that i have added then i would also like to remove that event listener also.

I think it's complicated to learn all new non-standard event handler that all frameworks try to re-invent... ideally i would just simply want to have a standard `EventTarget` instead that do support the `{ once, signal }` options as a third argument.

being able to use abortController would help tremendously. even for fetching data that needs to be used on a particular page. 

### Describe the proposed solution

```js
import { onDestroy } from 'svelte'

const ctrl = new AbortController()
const signal = ctrl.signal

signal.addEventlistener('abort', {
  elm.remove()
  elm = null // remove a element since we don't need it anymore
}, { once: true, signal })

something.addEventlistener('keyup', evt => {
  if (evt.key === 'escape') {
    ctrl.abort()
  }
}, { signal })

// unless this listener isn't removed it will still keep a references to some
// variable and prevent garbage collection if the added listener can't be removed...
onDestroy(() => { 
  elm.remove() // Error: can't call remove() of null
}, { signal}) // <-- add support for this
```

### Importance

would make my life easier
Repository: godot
Issue: The Copy button in documentation code blocks has a broken hitbox
Labels: bug,topic:editor,usability,topic:gui

### Tested versions

v4.4.dev.custom_build [0c45ace15]

### System information

Godot v4.4.dev (0c45ace15) - macOS 15.1.0 - Multi-window, 1 monitor - Metal (Forward+) - integrated Apple M1 Max (Apple7) - Apple M1 Max (10 threads)

### Issue description

It seems to be offset vertically which makes it harder to click

https://github.com/user-attachments/assets/4b67907d-168f-40ba-9e14-e59361b45770


### Steps to reproduce

N/A

### Minimal reproduction project (MRP)

N/A
Repository: angular
Issue: The menu items are invisible in Dark Mode specifically for V18 Angular dev page
Labels: area: docs-infra

### Describe the problem that you experienced

The menu items are not visible in dark mode; they only appear on mouse hover. In light mode, their visibility is also not satisfactory. This issue occurs across all browsers.

### Enter the URL of the topic with the problem

https://v18.angular.dev/

### Describe what you were looking for in the documentation

_No response_

### Describe the actions that led you to experience the problem

_No response_

### Describe what you want to experience that would fix the problem

_No response_

### Add a screenshot if that helps illustrate the problem

![Image](https://github.com/user-attachments/assets/76d18962-bfc4-4629-8e57-efdf17386e68)


### If this problem caused an exception or error, please paste it here

```true

```

### If the problem is browser-specific, please specify the device, OS, browser, and version

```true

```

### Provide any additional information here in as much as detail as you can

```true

```
Repository: TypeScript
Issue: Extend documentation of String.indexOf to mention what happens when substring is not found
Labels: Suggestion,Experience Enhancement

### 🔍 Search Terms

function documentation
jsdoc
NOT-FOUND


### ✅ Viability Checklist

- [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [x] This wouldn't change the runtime behavior of existing JavaScript code
- [x] This could be implemented without emitting different JS based on the types of the expressions
- [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [x] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [x] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

The documentation of `String.indexOf` should mention that -1 is returned when the substring is not found.

### 📃 Motivating Example

The documentation for indexOf on arrays already mentioned that the method returns -1 when the value is not found:

![Image](https://github.com/user-attachments/assets/304ab657-e744-4047-b71d-79d21290ece1)

But for strings, this information was missing thus far:

![Image](https://github.com/user-attachments/assets/0ea02fe8-e22b-4842-b4dc-7f186e528bae)

Of course the user would have been able to puzzle this together by seeing that the return type is just number, not something like number | undefined, thus allowing them to figure out that the sentinel value probably must be -1. Nevertheless, having to stop and think about this is unnecessary friction for people who don't remember this fact by heart, for example people who jump between programming languages a lot.

### 💻 Use Cases

1. What do you want to use this for?

To get more useful information from the language server while writing TS, which reduces interruptions / context switching, allowing the user to be more productive.

2. What shortcomings exist with current approaches?

The user has to stop and think about the not found case. Users coming from other languages might expect the `indexOf` function to maybe return `null` or `undefined` or throw an exception when the substring is not found.

3. What workarounds are you using in the meantime?

In cases where I've personally been faced with this issue in the past, I quickly used a js console to check the behaviour.
Repository: ui
Issue: [bug]: Text selection handles on iOS are not responsive for Input components in Dialog
Labels: bug

### Describe the bug

When Text Input is used in modal Dialog, it is impossible to drag the text selection handles (left & right side, to extend / shorten the selection) on iOS.

The bug can be tested on the examples on https://ui.shadcn.com/docs/components/dialog - the "Custom close button" example contains a Share Link input where it's possible to select text by double tapping the word, but the selection cannot be customised by dragging.

I guess it has something to do with the pointer-events that dialog manipulates with, z-index of the overlay and fixed dialog positioning, but I'm unfortunately not skilled enough FE dev to find out.

### Affected component/components

Dialog

### How to reproduce

1. Go to https://ui.shadcn.com/docs/components/dialog
2. Open the "Custom close button" example
3. Select text by double tapping the word,
4. Try to change selection range by dragging the handles -the selection is irresponsive

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
iOS 18.1
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: angular
Issue: add default value to resource and rxResource
Labels: area: core,core: reactivity,cross-cutting: signals

### Which @angular/* package(s) are relevant/related to the feature request?

_No response_

### Description

I'm experimenting now with the new resource and rxResource new APIs and one thing that is a bit hassle is that it adds undefined to the the type of it
for example I find myself needing a lot to do `resource.value() ?? []` because before I was making the signal value empty array till the value is loaded

### Proposed solution

is to add initial value to the [ResourceOptions](https://angular.dev/api/core/ResourceOptions)
points to be discussed
1. if `hasValue()` should be true or false if it's the initial value
2. when `resource.reload()` is called if it should return to the default value or not

### Alternatives considered

is to keep using `?? initialValue`
Repository: tailwindcss
Issue: [v4] Tailwind CLI high CPU on bad css
Labels: v4

<!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. -->

**What version of Tailwind CSS are you using?**

4.0.0-beta.2

**What build tool (or framework if it abstracts the build tool) are you using?**

Tailwind CLI.

**What version of Node.js are you using?**

v22.11.0

**What browser are you using?**

Doesn't matter.

**What operating system are you using?**

Linux.

**Reproduction URL**

Steps in `README.md`:

https://github.com/dotfrag/tailwind-issue-repro

**Describe your issue**

Repro steps in repo README.

With the following CSS:

```css
@import 'tailwindcss';

@theme {
  --font-sans: "Inter";
}
```

The node process is idling at 0.x CPU.

Then if you introduce bad css:

```css
@import 'tailwindcss';

@theme {
  --font-sans: "Inter", theme('fontFamily.sans');
}
```

The node process CPU usage skyrockets to 20% causing 70C+ temps.

The CPU usage does **not** go down when removing the bad code.
Repository: vscode
Issue: Editor GPU: Ignore token foreground color when there is a decoration with a foreground color
Labels: plan-item,editor-gpu

With https://github.com/microsoft/vscode/pull/234127 there is a new `charMetadata` that is passed along to the rasterizer and used as a key for the glyph:

https://github.com/microsoft/vscode/blob/9088a3747d6d1ec3c5d3a0c1149b51ac3843dc7b/src/vs/editor/browser/gpu/raster/glyphRasterizer.ts#L120-L124

https://github.com/microsoft/vscode/blob/9088a3747d6d1ec3c5d3a0c1149b51ac3843dc7b/src/vs/editor/browser/gpu/atlas/textureAtlasPage.ts#L92

A problem with this immediately is that the `tokenMetadata`'s color becomes redundant as it's foreground color is overridden by `charMetadata` (inline decorations). Meaning for different tokens with the same decoration, or even just same decoration color, the glyph will be duplicated in the atlas.

I think the best way forward here is to delete the portion of `tokenMetadata` if there is a decoration foreground color, similar to what we do here:

https://github.com/microsoft/vscode/blob/9088a3747d6d1ec3c5d3a0c1149b51ac3843dc7b/src/vs/editor/browser/gpu/atlas/textureAtlas.ts#L109-L110

Note that I think this also applies to partially transparent colors as it replaces the original color, not layers on top of it.
Repository: godot
Issue: Create a Plugin dialog can get lost behind its parent
Labels: bug,topic:editor,usability

### Tested versions

v4.3.stable

### System information

Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Ti (NVIDIA; 32.0.15.5612) - 12th Gen Intel(R) Core(TM) i9-12900KF (24 Threads)

### Issue description

If you open the Create a Plugin dialog via Project Settings -> Plugins -> Create New Plugin and then click on the Project Settings dialog, the Create a Plugin dialog is hidden behind it. 

While in this state, the Project Settings dialog is unresponsive though the Close and Create New Plugin button do Hover. The mouse cursor acts oddly; if you mouse over the dialog border it switches to a resize cursor and then stays that way even when not over anything that can be resized.

### Steps to reproduce

Open the Create a Plugin dialog via Project Settings -> Plugins -> Create New Plugin and then click on the Project Settings dialog,

### Minimal reproduction project (MRP)

No specific project needed.
Repository: vscode
Issue: Editor GPU: Opening a folded section double renders the line
Labels: bug,editor-gpu

![Image](https://github.com/user-attachments/assets/d2b1c1c2-0df0-47c7-884d-625e681aa624)
Repository: neovim
Issue: signcolumn: toggle alignment of signs
Labels: enhancement,documentation,column

### Problem

By default, signs in the signcolumn appear to be left justified. In other words, the first sign shows up on the far left, with additional signs added to the right of that, up to the maximum allowed.

However, when the signcolumn is wide, this can lead to significant visual separation between the sign and the line numbers/text when there aren't many signs on a line. For example, considering the lonely `W` at the top left, notice the big space between it and the line number:

![Image](https://github.com/user-attachments/assets/ed2c00fe-f67d-42f9-a340-3447489f9d41)

### Expected behavior

It would be nice if this could be configured. For example, `signalign = "left" | "right"`, where `"left"` equals the current default behavior (left-alignment, new signs added to the right) and `"right"` would beget right-alignment with new signs added to the left.
Repository: rust
Issue: Tracking issue for release notes of #130843: Tracking Issue for `#![feature(const_float_methods)]`
Labels: T-lang,T-libs-api,relnotes,A-const-eval,WG-const-eval,relnotes-tracking-issue


This issue tracks the release notes text for #130843.

### Steps

- [ ] Proposed text is drafted by PR author (or team) making the noteworthy change.
- [ ] Issue is nominated for release team review of clarity for wider audience.
- [ ] Release team includes text in release notes/blog posts.

### Release notes text

The responsible team for the underlying change should edit this section to replace the automatically generated link with a succinct description of what changed, drawing upon text proposed by the author (either in discussion or through direct editing).

````markdown
# Const Stabilized APIs
- [`<float>::recip`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.recip)
- [`<float>::to_degrees`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.to_degrees)
- [`<float>::to_radians`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.to_radians)
- [`<float>::max`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.max)
- [`<float>::min`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.min)
- [`<float>::clamp`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.clamp)
- [`<float>::abs`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.abs)
- [`<float>::signum`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.signum)
- [`<float>::copysign`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.copysign)
````

> [!TIP]
> Use the [previous releases](https://doc.rust-lang.org/nightly/releases.html) categories to help choose which one(s) to use.
> The category will be de-duplicated with all the other ones by the release team.
>
> *More than one section can be included if needed.*

### Release blog section

If the change is notable enough for inclusion in the blog post, the responsible team should add content to this section.
*Otherwise leave it empty.*

````markdown
````

cc @eduardosm -- origin issue/PR authors and assignees for starting to draft text
Repository: rust
Issue: Tracking issue for release notes of #132611: Add `AsyncFn*` to to the prelude in all editions
Labels: T-lang,T-libs-api,relnotes,A-async-await,relnotes-tracking-issue


This issue tracks the release notes text for #132611.

### Steps

- [ ] Proposed text is drafted by PR author (or team) making the noteworthy change.
- [ ] Issue is nominated for release team review of clarity for wider audience.
- [ ] Release team includes text in release notes/blog posts.

### Release notes text

The responsible team for the underlying change should edit this section to replace the automatically generated link with a succinct description of what changed, drawing upon text proposed by the author (either in discussion or through direct editing).

````markdown
# Libraries
- [Add `AsyncFn*` to the prelude in all editions.](https://github.com/rust-lang/rust/pull/132611)
````

> [!TIP]
> Use the [previous releases](https://doc.rust-lang.org/nightly/releases.html) categories to help choose which one(s) to use.
> The category will be de-duplicated with all the other ones by the release team.
>
> *More than one section can be included if needed.*

### Release blog section

If the change is notable enough for inclusion in the blog post, the responsible team should add content to this section.
*Otherwise leave it empty.*

````markdown
````

cc @compiler-errors, @ibraheemdev -- origin issue/PR authors and assignees for starting to draft text
Repository: godot
Issue: KTX texture is imported darker as it is - sRGB to linear
Labels: bug,topic:import

### Tested versions

- Reproducible in 4.3-stable
The related code was introduced in August 2023, so it might be happening in 4.2.x as well.

### System information

Godot v4.3.stable (77dcf97d8) - Windows 10.0.22631 - Vulkan (Mobile)

### Issue description

I noticed some glTF/glB were darker as I used to see them. Then I realized it was related to the Texture and the `KTX` format.

I've isolated the texture, and the effect is evident when I just import the texture.

Original texture 
![image](https://github.com/user-attachments/assets/69424ec4-e3fd-4082-9f9a-6bd490a21491)


Darker texture
![image](https://github.com/user-attachments/assets/433e3fdd-1c94-449e-97a6-eb9586bf1708)


After some research, I found that commenting the `srgb-to-linear` convertion, it works fine:
![image](https://github.com/user-attachments/assets/d82d7642-1f21-4e10-a340-8cf06039d1f5)
https://github.com/godotengine/godot/blob/0c45ace151f25de2ca54fe7a46b6f077be32ba6f/modules/ktx/texture_loader_ktx.cpp#L500



### Steps to reproduce

1. Open a empty project and copy the texture to the project folder
2. Double click the texture resource, you'll notice darker as it is

### Minimal reproduction project (MRP)


Example texture
[QEbvwX_0.zip](https://github.com/user-attachments/files/17879545/QEbvwX_0.zip)
Repository: rust
Issue: Compile time error, for structs with lifetime and trait functions that have a where clause
Labels: C-discussion,T-types

If two traits are dependent on each other and the implementing struct has lifetimes, the compiler cannot build the source code. The two traits work for all structs that do not have a lifetime.

However, you can avoid this error by commenting out the where clause from TPrivateFoo::execute().

I tried this code:

```rust
struct DData {
  counter: u32,
}

pub trait TFoo: TPrivateFoo {
  type NativeStruct;
}
pub trait TPrivateFoo {
  fn execute(&self, root: &<Self as TFoo>::NativeStruct)
  where
    Self: TFoo;
}

struct DSuccessBecauseNoLifetime {
  title: String,
}
impl TFoo for DSuccessBecauseNoLifetime {
  type NativeStruct = DData;
}
impl TPrivateFoo for DSuccessBecauseNoLifetime {
  fn execute(&self, root: &<Self as TFoo>::NativeStruct)
  where
    Self: TFoo,
  {
    println!("{}", root.counter);
  }
}

struct DSuccessBecauseCommentedOutWhereClause<'a> {
  title: &'a str,
}
impl TFoo for DSuccessBecauseCommentedOutWhereClause<'_> {
  type NativeStruct = DData;
}
impl TPrivateFoo for DSuccessBecauseCommentedOutWhereClause<'_> {
  fn execute(&self, root: &<Self as TFoo>::NativeStruct)
  //where
  //  Self: TFoo,
  {
    println!("{}", root.counter);
  }
}

struct DErrorBecauseOfLifetime<'a> {
  title: &'a str,
}
impl TFoo for DErrorBecauseOfLifetime<'_> {
  type NativeStruct = DData;
}
impl TPrivateFoo for DErrorBecauseOfLifetime<'_> {
  fn execute(&self, root: &<Self as TFoo>::NativeStruct)
  // ####### Compile error #######
  where
    Self: TFoo,
  // #############################
  {
    println!("{}", root.counter);
  }
}
```

I expected to see this happen:
Source code is successfully compiled

Instead, a compile time error occured:
```
error[E0609]: no field `counter` on type `&<DErrorBecauseOfLifetime<'_> as TFoo>::NativeStruct`
  --> src\test.rs:57:25
   |
57 |         println!("{:?}", root.counter);
   |                               ^^^^^^^ unknown field
```

### Meta
Bug **exists** in both stable and nighlty build.

`rustc --version --verbose`:
```
rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: x86_64-pc-windows-msvc
release: 1.82.0
LLVM version: 19.1.1
```
Repository: react
Issue: Bug: startTransition is causing TypeError when used directly from react
Labels: Status: Unconfirmed,Resolution: Needs More Information

<!--
  Please provide a clear and concise description of what the bug is. Include
  screenshots if needed. Please test using the latest version of the relevant
  React packages to make sure your issue has not already been fixed.
-->

React version: 18.3.1

## Steps To Reproduce

Getting this error message

`TypeError: Cannot read property 'add' of undefined`

1. Run the code example https://snack.expo.dev/@raajnadar/swr-error-in-expo-sdk-52
2. Run android or ios, the web version works without the error
3. Click the "Call the API button" button inside the mobile app
4. Check the logs tab, when switched to axios there is no issue
5. This happens with `swr` because it uses startTransition internally

<!--
  Your bug will get fixed much faster if we can run your code and it doesn't
  have dependencies other than React. Issues without reproduction steps or
  code examples may be immediately closed as not actionable.
-->

Link to code example:

Import like this

```
export const startTransition: (scope: TransitionFunction) => void =
  IS_REACT_LEGACY
    ? cb => {
        cb()
      }
    : React.startTransition
```
And use like this

```
startTransition(() =>
   setState({ data, isMutating: false, error: undefined })
)
```

Code from this repository https://github.com/vercel/swr/blob/1585a3e37d90ad0df8097b099db38f1afb43c95d/src/mutation/state.ts#L5-L10

<!--
  Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a
  repository on GitHub, or provide a minimal code example that reproduces the
  problem. You may provide a screenshot of the application if you think it is
  relevant to your bug report. Here are some tips for providing a minimal
  example: https://stackoverflow.com/help/mcve.
-->

## The current behavior

Getting this error when `startTransition` used from React directly

`TypeError: Cannot read property 'add' of undefined`

On Expo snack the error says

`Error: "Cannot read property 'add' of undefined" in TypeError: Cannot read property 'add' of undefined <<     at requestUpdateLane (/data/user/0/host.exp.exponent/files/.expo-internal/5cb1b0c52b8fcab94364327c83b808ee:18892:43) <<     at dispatchSetState (/data/user/0/host.exp.exponent/files/.expo-internal/5cb1b0c52b8fcab94364327c83b808ee:16726:33) <<     at anonymous (swr.mutation:12:14616)`

## The expected behavior

There is no TypeError,

When I tried using the `startTransition` from the `useTransition` hook the problem got solved