sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: storybook
Issue: proposal: client api addPreviewAddon
Labels: feature request,preview-api

It would be great to have an api to extend the 'preview' area with custom addons - similar to the way the manager area can create addons.


The initial use case is to extend just the 'Preview' component to add additional tab/panel in addition the source panel (later could extend all sorts of preview doc blocks, like additional tabs on the PropsTable, or a source view that will render the source with control values pre-calculated), to add new tabs to it that can render various information and controls, here is a use case:

![extend-preview](https://user-images.githubusercontent.com/6075606/73505656-19363500-43a1-11ea-82cf-d1ac5a2b7f06.gif)

My proposal would be  something like (mock-up code): 

```

export interface PreviewAddonReturnType<ReturnType = unknown> {
  enabled: boolean;
  title: string;
  render: StoryFn<ReturnType>;
};

type PreviewAddonTypeFn<StoryFnReturnType = unknown> = () => PreviewAddonReturnType<   StoryFnReturnType>


interface PreviewAddon<StoryFnReturnType = unknown> {
  type: string;
  callback: PreviewAddonTypeFn<StoryFnReturnType>
}

import { addPreviewAddon } from '@storybook/react';

addPreviewAddon(addon: PreviewAddon):


myStory.story = {
  previewAddons: [{
  type: 'preview',
  callback: (context: StoryContext) => {
    enabled: context.parameters.myaddon.enabled,
    title: 'screenshot',
    render: () => (<img src="screenshotofstory.png" />)
  }
}]
}
```
Repository: flutter
Issue: Support web libraries in Flutter web plugins
Labels: c: new feature,platform-web,c: proposal,P2,a: plugins,team-web,triaged-web

## Use case

If anyone currently wants to build a flutter web app or plugin that can play audio, it is natural to be able to import `dart:web_audio`. Perhaps there are other web libraries that Flutter web developers would like to be able to use as well.

However, currently the only supported web imports for Flutter web projects are `dart:html`, `dart:js`, and `dart:js_util` according to #48639 .

## Proposal

There should be an official library for web audio. In fact, there already is one called `dart:web_audio` and in principle (to avoid duplicated effort) it should be made available to Flutter web projects in some form e.g. even as a separate library on pub.dev if it can't be part of the Flutter sdk.

There are already published "Flutter web" plugins such as [soundpool](https://pub.dev/packages/soundpool) that use `dart:web_audio` and so it would not make sense to deny access to this web library in a Flutter web context.


As some background, @devoncarew wrote in #48639 that:

> My suspicion is that we should avoiding adding any more dart: web libraries to the flutter sdk, and instead prefer that those capabilities be accessed via new JS inter-op.

And @jonahwilliams wrote:

> What we've done so far is very much a stopgap. I think the next steps are the various Flutter & Dart teams need to formalize a decision here for the long-term

To the first point, you could still move it to pub.dev as a separate library so that it's not part of the sdk.

I should also mention that a workaround was suggested by @hterkelsen : 

> as a workaround you can use package:js in your plugin to wrap the Web Audio API.

But the Web API is not simple. It is a lot of work to create a wrapper. Asking developers to create their own wrappers might be acceptable for simple cases (wrapping a single class or function) but not for a whole library of interdependent classes where a 1st party library already exists. If it's going to take a lot of effort to build a wrapper, reuse should be a consideration.

On a related note, given that published plugins for Flutter web are currently using `dart:web_audio` but are just ignoring the errors/warnings, I would also be interested to hear your view on this practice and whether we can expect plugins doing this to break in the future.
Repository: storybook
Issue: proposal: prop table api to add columns to the prop rows 
Labels: feature request,block: props

api to allow addons to create additional columns in the prop tables, for example for editing the values for the story. 
such an addon would need access to the full list of props to identify if it will add columns (for example the story might have a list of controls/knobs - and if one of their names corresponds to the one of the names of the prop table, it will creat an additional column (with a title)

screenshot of use case:
![grab44](https://user-images.githubusercontent.com/6075606/73506037-4fc07f80-43a2-11ea-8884-4b6f024a9fbc.jpg)
Repository: storybook
Issue: proposal: api (parameter.option) to enhance story data
Labels: feature request,preview-api

add a global option to allow addons to enhance the story data on loading a story:
for example

const storyLoaders = [...]

and in story_store addStory

const { loaders } = parameters.options || {};
here merge returned added story props to the story store: 

loaders(parameters):

this will allow addons to create additional data for the stories - for example a smart-controls/knobs addon will create addition control fileds/properties based on the prop-tables of the component in the story.
Repository: terminal
Issue: Refactor Word Expansion in TextBuffer
Labels: Product-Terminal,Issue-Task,Area-CodeHealth

# Description of the new feature/enhancement

In #4018, word navigation for selection and accessibility is merged into this mess:
- `GetWordEnd` (with `accessibilityMode` flag)
- `GetWordStart` (with `accessibilityMode` flag)
- `MoveToNextWord`
- `MoveToPreviousWord`

There _has_ to be a way to combine all of these into just 2 functions (or 4 with an accessibilityMode flag). Unfortunately, doing so at the time could have resulted in breaking Selection for the sake of Accessibility (if one was not careful). So here's a work item to refactor that and make it look _waaaaay_ better.

# Proposed technical implementation details (optional)

There's a good amount of repeated code/concepts throughout these functions. I think we should just rely on making the function return a bool and have an in/out param.
Repository: go
Issue: compress/flate: Allow resetting writer with new dictionary
Labels: Performance,NeedsDecision

As of Go 1.14, compress/flate's Writer only allows resetting the write side with the same dictionary.

In contrast, the Reader can be reset with a new dictionary.

I need this to efficiently implement context takeover compression for WebSockets.

See https://tools.ietf.org/html/rfc7692#section-7.1.1

cc @klauspost
Repository: go
Issue: net/http/cookiejar: add a disk backed persistent CookieJar
Labels: help wanted,NeedsInvestigation

hi mr, sorry for this silly issue, but can we have this feature in Go ?, i think as a battery-included language, we should have this feature mr.

nb : Python has this feature by the way, https://docs.python.org/3/library/http.cookiejar.html#http.cookiejar.FileCookieJar
Repository: vscode
Issue: Proposal: expose manual installation of vscode-remote
Labels: feature-request,remote

<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
It would be nice if we could expose a more easy none reverseengineering method to install vscode-remote inside a container or target remote directory with a predefined config so a developer only needs to connect and it is all installed. 

i am aware that this is do able via vscode ide at present but i want a script able way to deploy many workspaces predefined. You maybe already got or can need the code for vscode-online anyway.
Repository: godot
Issue: Render "GLES2" does not draw Polygon2D on Android 
Labels: bug,platform:android,topic:rendering,topic:2d

godot 3.1.2-stable

Android 6.0 (BF166_BOOST3-SE_L010)

If you use the "GLES2" render, then the Polygon2D is not drawn!
If you use the "GLES3" render, then everything works
Textures imported as Loss

GLES2:
![image of GLES2](https://i.imgur.com/rOo9p6c.jpg)

GLES3:
![image of GLES3](https://i.imgur.com/Pil2Gfr.jpg)

PS:
I need [it for beautiful animations](https://www.youtube.com/watch?v=4YfzkH1RHsg)
Repository: pytorch
Issue: [docs] Missing docs for torch.__version__ and torch.version
Labels: module: docs,triaged,small

https://pytorch.org/docs/master/search.html?q=__version__&check_keywords=yes&area=default#

https://pytorch.org/docs/master/search.html?q=version&check_keywords=yes&area=default#

Both are also missing from the doc navigation left pane (`torch.__config__` is there)
Repository: godot
Issue: Don't do heap allocation during initialization of Array and Dictionary
Labels: enhancement,topic:core

@sheepandshepherd pointed out something really interesting here https://github.com/godotengine/godot/issues/34264#issuecomment-577939718

Currently all builtins except array and dictionary initialize without doing any heap allocation.

For instance `Pool*Array` lazily allocate it underlying buffer
https://github.com/godotengine/godot/blob/5da20d6cf2b334a0703f95fd05e84a9a5aa29a0f/core/pool_vector.h#L464

This is cool because it means resizing the container just after initialization becomes optimal (instead of having.

On top of that this means GDNative code would be guaranteed that doing zero initialization is enough to initialize builtins:
```c
godot_string var_var;
memset(&my_var, 0, sizeof(godot_string));
```
Repository: flutter
Issue: Circular widget with wrap text inside
Labels: c: new feature,framework,a: typography,c: proposal,P3,team-framework,triaged-framework

## Use case
 Hi,
I need a circular widget or existent widget with circular shape (like Containter), with propriety to wrap text inside like this image: 
![6GxZI](https://user-images.githubusercontent.com/21011641/73535301-90141200-4423-11ea-8fd0-42e0e34569f2.png)

I tried the follow solutions

 - Container with shape circular, but the padding persist rectangular/square.
 - A parcial implementation with CustomPaint, but I guess this is expensive to build
 - The combination of ClipOval and FittedBox widgets, but this cut the text

A posible principal problems with this solutions is

 - Adjust texts with different screen sizes
 - Expensive rebuild when update the text (like the seconds of a clock) in CustomPaint
 - 'Complex' and specific maths operations to build the widget

I found [this widget][3] for inspiration, but it didn't solve the problem. Also, find [this answer](https://stackoverflow.com/a/56978421/8700272) in Stackoverflow, but is complex to build a 'simple' widget 

Thanks for anything help.

  [3]: https://pub.dev/packages/flutter_circular_text
Repository: flutter
Issue: Document how and when to use TextPainter.setPlaceholderDimensions
Labels: c: crash,framework,d: api docs,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-framework,triaged-framework

Hello Flutter Dev Team! :)

When I use **TextSpan** with **WidgetSpan**, the **TextPainter** fails on calling **tp.layout()**.


          var span = TextSpan(
            children: [
                WidgetSpan(child: Icon(Icons.access_time)), 
                TextSpan(text: "Clock")
            ],
          );

          var tp = TextPainter(
            maxLines: 10,
            textAlign: TextAlign.left,
            textDirection: TextDirection.ltr,
            text: span,
          );

          tp.layout();



**Flutter (Channel stable, v1.12.13+hotfix.7, on Linux, locale en_US.UTF-8)**

```
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building LayoutBuilder:
'package:flutter/src/widgets/widget_span.dart': Failed assertion: line 103 pos 12: 'dimensions != null': is not true.

When the exception was thrown, this was the stack: 
#2      WidgetSpan.build (package:flutter/src/widgets/widget_span.dart:103:12)
#3      TextSpan.build (package:flutter/src/painting/text_span.dart:211:15)
#4      TextPainter.layout (package:flutter/src/painting/text_painter.dart:544:13)
```
Repository: kubernetes
Issue: K8s breaks CSI idempotency requirement: NodePublishVolume() passes same target_path for all block mode consumers
Labels: kind/bug,sig/storage,lifecycle/stale

For filesystem volumes, NodePublishVolume receives, e.g., 
```
GRPC request: {"target_path":"/var/lib/kubelet/pods/eda0c617-a1ca-4260-a6cd-3cc1dca8560a/volumes/kubernetes.io~csi/<PV-NAME>/mount" ...
```
which is different for every pod. However, for block mode volumes, it is like
```
GRPC request: {"target_path":"/var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/publish/<PV_NAME>" ...
```
regardless of the pod to which the device is being attached, and the same is true for NodeUnpublishVolume.

It appears that there is no way for a CSI driver to distinguish between a repeated NodePublishVolume() for the same pod (to which the CSI spec requires it to respond positively for idempotency) and a request for a different pod on the same node.

But it needs to know: in the latter case, it needs to track how many pods still have the device attached, so that it knows what to do when it receives a NodeUnpublishVolume(), including whether or not to unmount the bind mount. Put another way: if the path differed for every consumer then it could simply umount and delete.

The context is a CSI driver providing only NodePublishVolume/NodeUnpublishVolume

/sig storage

**Environment**:
- Kubernetes version (use `kubectl version`):

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:13:49Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

- OS (e.g: `cat /etc/os-release`):
Ubuntu 18.04.3 LTS \n \l

- Kernel (e.g. `uname -a`):
5.0.0-37-generic
Repository: pytorch
Issue: __cuda_array_interface__ conversion does not support readonly arrays
Labels: module: internals,module: cuda,triaged,module: numba

PyTorch does not support importing readonly GPU arrays via `__cuda_array_interface__`:
https://numba.pydata.org/numba-doc/dev/cuda/cuda_array_interface.html

https://github.com/pytorch/pytorch/blob/2471ddc96c56162861f41f3b6b772b4b4e773ea7/torch/csrc/utils/tensor_numpy.cpp#L292

## To Reproduce

If you have a copy of jax and jaxlib with GPU support built from head, the following will reproduce:

```
In [1]: import torch, jax, jax.numpy as jnp

In [2]: x = jnp.array([1,2,3])

In [3]: y = torch.as_tensor(x)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-f43755a1deef> in <module>
----> 1 y = torch.tensor(x)

TypeError: the read only flag is not supported, should always be False
```

(Aside: this is not a PyTorch bug, but curiously CuPy drops the readonly flag, so you can make the import "work" by laundering the array through CuPy:
```
In [1]: import torch, jax, jax.numpy as jnp, cupy

In [2]: x = jnp.array([1,2,3])

In [3]: y = torch.as_tensor(cupy.asarray(x), device="cuda")

In [4]: x.__cuda_array_interface__
Out[4]:
{'shape': (3,),
 'typestr': '<i4',
 'data': (140492215944704, True),
 'version': 2}

In [5]: y.__cuda_array_interface__
Out[5]:
{'typestr': '<i4',
 'shape': (3,),
 'strides': (4,),
 'data': (140492215944704, False),
 'version': 1}
)
```

## Expected behavior

PyTorch should support the readonly flag.



cc @ngimel
Repository: rust
Issue: Oddity in what lines count towards coverage
Labels: A-debuginfo,P-low,T-compiler

I asked this over on `mozilla/grcov` but then realized that it is better suited to here.

While using the following `RUSTFLAGS` to generate coverage reports I have found some odditites with what is considers to be covered/not-covered/not-needed to be covered.

```
-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads
```

1. Test functions (all of `mod tests`) are counted towards coverage
2. Some comments (including doc comments) are counted towards coverage (and sometimes not covered even though the "line" was passed through)
3. struct/enum definitions (even if that variant/type is used or created)
4. trait definitions (even if a type which implements that trait is used through a trait typed variable)
5. Close braces (even if both branches are taken)
6. use statements

Would it be possible to either add a flag to ignore these, or to just ignore them all the time?
Repository: godot
Issue: Oculus VR Module causes white screen on Windows 10
Labels: bug,topic:editor

**Godot version:**
3.2 Edit: and all prior. It appears to be an issue with the Oculus Plugin itself.
**OS/device including version:**
Windows 10
**Issue description:**
Oculus Vr Module causes issues when opening a .godot project file.
**Steps to reproduce:**
1. Create a project.
2. In Godot on Windows 10, open the project and add the Oculus VR Module through the AssetLib tab.
3. Close Godot.
4. Try to reopen project in Godot.

It does not matter what platform any of the steps are performed in, the resulting project will always open to a white screen on Windows 10 as long as the Oculus Module is installed for the project.
Repository: TypeScript
Issue: Declaration emit for private identifiers in class expressions is wrong
Labels: Bug,Help Wanted,Rescheduled

**Code**

```ts
const O = class { #g }
```

**Expected behavior:**

```ts
declare const O = class { #private }
```

**Actual behavior:**

```ts
declare const O: {
    new (): {
        "__#1@#g": any;
    };
};
```
Repository: godot
Issue: Custom C# script templates sometimes cause the editor to freeze permanently
Labels: bug,topic:editor,topic:dotnet

**Godot version:**
3.2 (Mono)

**OS/device including version:**
Windows 10

**Issue description:**
When creating a C# script from a custom template (located in script_templates) the editor sometimes permanently freezes and locks up when the .mono directory is present. Some more details gathered after testing:

- The .mono directory generated when opening the project does not cause the freeze
- The freeze always happens after pressing the build button, or running the game
- Deleting the .mono directory does not prevent the crash until the editor is restarted
- Just restarting Godot without deleting .mono does not fix the issue
- No errors/logs in the console

![crash](https://user-images.githubusercontent.com/7606171/73563346-6546af80-445d-11ea-85f7-c9c1b7e7cf65.gif)

The contents of my script look like this

```csharp
using Godot;
using System;

namespace Asteroids
{

    public class %CLASS% : %BASE%
    {

        public override void _Ready()
        {
           
        }

        public override void _Process(float delta)
        {
            
        }

    }

}
```

**Steps to reproduce:**
- Open up a working Mono project
- Creating a script from a custom template freezes the editor
- Close the editor & delete the .mono directory
- Custom scripts now work again



**Minimal reproduction project:**
I prefer to keep my projects source private, and so far attempting to reproduce the issue in separate projects hasn't worked out yet

This issue started happening around the same time as my other issue #35664
Repository: pytorch
Issue: Confusing error messages of tensor.scatter_ on both CPU and CUDA
Labels: module: docs,module: error checking,triaged,module: scatter & gather ops

Both messages seem to be wrong and confusing. basically the V should have the same dimensions as I. Input/output tensor have nothing to do with this dimension check (failing argument inds are different and confusing too). However it would be good if `torch.gather` and `tensor.scatter_` supported broadcasting (adding extra dimensions or at least expanding if all dimensions are present).

These error messages also have different terminology compared to the docs. They term `self` as `output tensor` and `src`/`V` as `input tensor` (another error message of this kind `RuntimeError: invalid argument 3: Index tensor must be either empty or have same dimensions as input tensor at /opt/conda/conda-bld/pytorch_1577225354628/work/aten/src/THC/generic/THCTensorScatterGather.cu:115`)

```python
import torch

device = 'cuda'

res = torch.zeros(1, 87810, device = device, dtype = torch.long)
I = torch.ones(1, 148661, device = device, dtype = torch.long)
V = torch.arange(148661, device = device, dtype = torch.long)

res.scatter_(-1, I, V.unsqueeze(0)) # works

res.scatter_(-1, I, V)
#CUDA:
#Traceback (most recent call last):
#  File "bug.py", line 11, in <module>
#      res.scatter_(-1, I, V) # fails with:
#     RuntimeError: invalid argument 3: Index tensor must be either empty or have same dimensions as input tensor at /opt/conda/conda-bld/pytorch_1577225354628/work/aten/src/THC/generic/THCTensorScatterGather.cu:115

#CPU:
#Traceback (most recent call last):
#  File "bug.py", line 11, in <module>
#      res.scatter_(-1, I, V)
#     RuntimeError: invalid argument 4: Input tensor must have same dimensions as output tensor at /opt/conda/conda-bld/pytorch_1577225354628/work/aten/src/TH/generic/THTensorEvenMoreMath.cpp:670
```

cc @jlin27 @mruberry
Repository: go
Issue: x/pkgsite: support searching for internal packages
Labels: NeedsInvestigation,pkgsite,pkgsite/search

For example: https://pkg.go.dev/search?q=internal%2Flsp should return results including https://pkg.go.dev/golang.org/x/tools/internal/lsp?tab=doc.
Repository: PowerToys
Issue: Lock the numeric keypad to always and forever use numbers 
Labels: Help Wanted,Good first issue,Idea-New PowerToy

# Summary of the new feature/enhancement

The numeric keypad has two states, use like numbers or use like idk navigation and idk what else. I wanna just use the numbers and I want it to never ever again change to anything else than numbers. Is very annoying it keeps changing.

# Proposed technical implementation details (optional)

Just lock it in the numeric keypad state and prevent any state switch, forever. Thank you!
Repository: godot
Issue: Pressing <tab> to move to the next input field selects the input label instead, when editing the Border Width in a custom style
Labels: bug,topic:editor,confirmed,topic:gui

**Godot version:** 3.2

**OS/device including version:** Linux 5.4.15

**Issue description:** Pressing tab to select the next input field selects the label instead

**Steps to reproduce:**
*   Create a new project
*   Create a control node
*   Add a Panel as a child to the control node
*   Under Custom Styles create a new StyleBoxFlat
*   Under Border Width, click the input box for Left and enter a numerical value,
    now press the tab key to select Top, enter a value, continue to do this for Right
    and Bottom as well.
    This is the important step: press the tab key once more.
*   Click the Left input field for Border Width again and enter a new value,
    press the tab key and enter a new value for the Top and Right inputs.
    Pressing the tab key from the Right input should take you to the Bottom input
    however it highlights the Bottom label instead of the input field and it's not possible to enter a new value (even if it's selected with the mouse cursor).