text:
Questions?

Very nice. But ...
I have code experience so, not that (done VST2 and VCVRack). General interest and coding possibilities.

112 up to 127 seem to be favourite selects, why does the algorithm function pointers stop at 107 and not 111?
64 to 87 enable SD card (ok), is the file system fopen etc., or some other way for getting files (haven't found the filesystem code ...)? And this range of algorithms is best kept for SD card use for consistency?
Inputs are a little scarce at 3, (XYZ), would a XYZ to AB->XY with a Z for a "pair mode" (delta coding?) and 2 distings work? I'm sure some 4 input specials might be good.
I might not develop, but making the reply general or on the Wiki would be good. (more of a data request).
A simplistic float -> (int, int) ADT with normalisation for output basic set of +* would assist many. Any plans to extend the "source"?

That's most likely an oversight.
It relies on the Microchip libraries for accessing the SD. There's no reason to keep this particular range.
No idea what you mean, sorry.
OK.
No plans to extend this source code.

Suppose 2 distings are available. XYZ can map to AB as some coded standard, and use just XY on the second disting. So XYZ and Z on the second become CV.

So given 96KHz sample rate, with AB channels, then effectively that's 4 44.1KHz channels and a control stream. So XYZ and sync.

I've thought about it and a good implementation might be XY to A, and Z plus some parameter to B. If the mode itself can set up persistent flags (on/off) such that other modes on a second device have slightly lower audio quality multi CV input on X or Y from the LFO and low audio rate primary disting. I think checking a few flags with some extra input processing rather than loads of extra duplicated modes might be better. Not sure of the MIPS on it ...

Another question: I am looking at https://github.com/expertsleepersltd/disting/blob/master/hello_disting_mk4/main.c#L329C49-L329C49
Why are all algorithms sumDifference? Is it because the actual algorithm implementations are not open source and just the framework is, so the algorithms are built separately somehow? :)

Yes. This isn't the actual disting source code, it's just an open source framework which is similar to the actual code.

Thanks for the quick, although disappointing, answer. But it's what I realized after lots of digging. Was hoping to see the actual algorithms. Cheers!

authors: expertsleepers ibz jackokring

repo: expertsleepersltd/disting


text:
If i am using a local RAG. Which context am i suppose to use during evaluation

Your Question
From my understanding, the "create your own test set" documentation uses OpenAI models and embeddings to create Question/context/groundtruth. In this case, context is obtained using embeddings from OpenAI.
When I use my own RAG pipeline, I use GenAI embeddings, which will provide different contexts.
So I'm just wondering, during evaluation, if I should include contexts from my RAG or use the context obtained during test set generation?
Or maybe I am misunderstanding something, if so, please do correct me. Thank you

I see.
So effectively, the Question and ground truth portion of my test set is obtained from the "create your own test set" documentation. While the answer and context portion is obtained from my own RAG pipeline?

source: gharchive/issue

repo: explodinggradients/ragas

license_type: permissive

license_source: github-api


text:
How should this be run?

I tried a few things, and have had no success so far. It looks to me as if
gunicorn <something>
might be close.

Sorry I missed this in the docs! Will update.
If you're just hacking locally, python displacy/app.py or python/sense2vec/app.py should do the trick.

One reason why that doesn't work is that displacy/app.py refers to displacy.server, and should probably refer to displacy_service.server, to match the name of the directory. I can fix that, but it doesn't seem to be enough.

Is this resolved now? I just made a quick hot-fix in the web UI that I think addresses the schema issues.

still seeing
curl -s localhost:8000/en/schema
{
"title": "Schema construction failed",
"description": "'spacy.tagger.Tagger' object has no attribute 'moves'"
}
for
spacy.version == '1.6.0'
Python 3.5.2 |Anaconda custom (x86_64)|

authors: cbrew honnibal

repo: explosion/spacy-services

license: MIT


text:
Scroll disappears on the page if two sliders in use

If i put inside provider two sliders it works fine but scroll disappears from the page by clicking on slider. It gives overflow: hidden to the body tag of html document. Does it suppose to work with two sliders inside single Provider?

Hi! Could we revive this? I'm seeing this as well

repo: express-labs/pure-react-carousel

license: mit

license_source: bigquery


text:
Expected a valid instance of ExpressiveCodeAnnotation, but got ... (InlineStyleAnnotation)

Problem description
After upgrading to astro-expressive-code@0.33.4, I'm getting the error
Plugin "Shiki" caused an error in its "performSyntaxAnalysis" hook. Error message: Expected a valid instance of ExpressiveCodeAnnotation, but got {"inlineRange":{"columnStart":0,"columnEnd":88},"renderPhase":"earliest","color":"#99A0A6","italic":false,"bold":false,"underline":false,"styleVariantIndex":0}

when rendering syntax-highlighted code.
Analysis
After digging around a bit, I've found that this happens when @expressive-code/plugin-shiki attempts to add an InlineStyleAnnotation, whose definition it has imported from its dependency on @expressive-code/core:
https://github.com/expressive-code/expressive-code/blob/24697495ac33a88339e0d0073c5548ba0ea0265d/packages/%40expressive-code/plugin-shiki/src/index.ts#L113-L126
This instance is then passed to the calling code, and eventually makes its way into @expressive-code/core's validateExpressiveCodeAnnotation, which validates it using instanceof ExpressiveCodeAnnotation:
https://github.com/expressive-code/expressive-code/blob/24697495ac33a88339e0d0073c5548ba0ea0265d/packages/%40expressive-code/core/src/common/annotation.ts#L219
Unfortunately there is a subtle trick of package management here, which causes this code to fail its intended function: when plugin-shiki instantiates an InlineStyleAnnotation, it does so based on the class definition imported from its dependency (node_modules/@expressive-code/plugin-shiki/node_modules/@expressive-code/core). When @expressive-code/core (the root dependency, not the dependency from plugin-shiki) runs the instanceof, it does so using the class definition in its own package (node_modules/@expressive-code/core).
Although node_modules/@expressive-code/core and node_modules/@expressive-code/plugin-shiki/node_modules/@expressive-code/core contains the same code, they are not referentially equivalent. For this reason, annotation instanceof ExpressiveCodeAnnotation returns false.
flowchart TD
    subgraph shiki [plugin-shiki]
        subgraph shikicore [core]
            shikiInline[[InlineStyleAnnotation]]
            shikiAnno[[ExpressiveCodeAnnotation]]
            shikiInline -.->|Extends| shikiAnno
        end
        annotation -.->|Instance of| shikiInline
    end
    subgraph core [core]
        anno[[ExpressiveCodeAnnotation]]
        validate(["validateExpressiveCodeAnnotation(annotation)"])

        validate -.->|Checks inheritance of| anno
    end

    annotation -->|Passed to|validate

Reproduction
When trying to create a reproduction repo for this issue, I found that installing a fresh install of Astro and Expressive Code didn't replicate the issue. When looking at the installed node_modules, there was no node_modules/@expressive-code/plugin-shiki/node_modules.
It looks like this issue depends a lot on whether NPM decides to install @expressive-code/core as a dependency of @expressive-code/plugin-shiki, or keeps it deduplicated in the root node_modules. Usually NPM only does this if the version specified in dependencies of plugin-shiki doesn't match the version specified in the root dependencies, but in my case it looks like it got confused.
One way I've found of replicating this behavior:

Check out or create a workspace of the reproduction repo (a simple Astro starter from version ^3.4.3, with astro-expressive-code and @expressive-code/plugin-collapsible-sections on version ^0.26.2)
Run npx @astrojs/upgrade (or change the version of Astro in package.json to ^4.4.15
Change the version of astro-expressive-code to ^0.33.4 while removing @expressive-code/plugin-collapsible-sections. This is the crucial step - upgrading one package while removing an old plugin seems to get NPM confused in the install order..
Run npm install
Verify that node_modules/@expressive-code/plugin-shiki/node_modules exists, and that /test throws the error from this issue when rendered.

Workaround
The workaround looks to be to delete package-lock.json and running npm install again. This seems to force NPM back to its intended functionality, where it installs @expressive-code/core only in the root node_modules, not also in plugin-shiki/node_modules.
I'd still consider this a bug in Expressive Code, since plugin-shiki doesn't work in some valid dependency configurations, e.g. with different versions of plugins installed.

repo: expressive-code/expressive-code


text:
Method connect not implemented

Function app.METHOD supports connect, but my simple example didn't work.
'use strict'

var app = require('express')()

app.connect((res, req, next) => {
  console.log('connect method!')
  req.end()
})

app.listen(1234, () => {
  console.log('listening')

  var req = http.get({ port: 1234, 'method': 'connect' })

  req.on('socket', socket => {
    console.log(JSON.stringify(socket._pendingData))
    socket.on('data', d => console.log('socket data: ' + d))
  })

  req.on('connect', (res, socket, head) => {
    console.log('connected')
    socket.destory()
  })
})

Try run that and connection is hang-up immediately.
From docs: https://nodejs.org/api/http.html#http_event_connect_1
Event connect is emitted each time a client requests a http CONNECT method. If this event isn't listened for, then clients requesting a CONNECT method will have their connections closed. Well express should care about this?

I'm not sure that mapping a CONNECT HTTP request to a path in Express is meaningful; AFAIK CONNECT is specific to a proxy server for requesting tunnelling to a hostname/port. The request URL is always a hostname/port of a server with which to open the tunnelling connection. Unlike other methods it does not refer to a resource path on the Express server.
The Node.js HTTP module does not pass CONNECT requests to listeners of the 'request' event (Express is such a listener), only to listeners of the 'connect' event so Express is not aware that the request has arrived. Also note that while the callback for a 'connect' event does get passed a request object, it doesn't get a response object, instead it gets a socket and head.
I'd be interested to hear if  there is a way in which handling the CONNECT method makes sense in a route handler, if anyone else in the community has experience of that.

Yea, Express does not actually support CONNECT in any way, and it being a properly is an annoying fluke of just adding all the methods found in the Node.js core HTTP method list, rather than limiting to only supported methods.
If the documentation says CONNECT is supported, let's get that fixed.
Let's think of what should be done in 5.0, either maybe we should determine a better way to load supported methods (which should address the BIND problem as well) or figure out how to support non req/res style methods (which could also take into account ws).

For me it's ok to just fix the docs, rather then implementing connect method, which can little bit difficult according what @tunniclm wrote.

PROPFIND and PROPATCH not supported too. Thanks @pravdomil for bringing this to our notice.
Opened a PR to update the doc - https://github.com/expressjs/expressjs.com/pull/629

Thanks for the docs update, @hacksparrow :)

Just wanted to add here, the methods that are "no longer supported" are still shown as methods on an instance of express
const app = require('express')();

app.connect('/test', (req,res) => {
 res.end();
})
app.propfind('/test', (req,res) => {
 res.end();
})
app.proppatch('/test', (req,res) => {
 res.end();
})

Should these methods be removed from the express instance as well? Or ignored?

authors: dchicchon dougwilson hacksparrow pravdomil tunniclm

repo: expressjs/express


text:
Support for Option<Strings>, Option<Doubles>, and friends

One is now able to
#[extendr]
fn return_me() -> Option<Strings> {
// ...
}

And that seems like a simple oversight.
I've added this for Strings, Complexes, Doubles, Integers, S4, ExternalPtr<T>, RArray<T,D> (and thus also for RMatrix). It is not possible to add for #[extendr]-impl blocks as we don't own those types involved (or something like that).
This oversight comes because we have concentrated about parsing types from R but not necessarily to R, where there we must provide Into<Robj> (by way of From<T> for a given T).

It's worth noting here that we are providing a very specific opinion for how returning an Option<T> should behave. In these cases we are saying that in the case of None we are returning NULL and the case of Some<T> we are returning T

Resolved merge conflicts. CI is starting.

source: gharchive/pull-request

authors: CGMossa JosiahParry

repo: extendr/extendr


text:
Fix URLs

Hi, thanks for this project, very useful!
Quick PR to fix the "Edit" links, which currently lead to 404 pages, because they are leading to the old https://github.com/extension-js/extension.js location:

Great, thanks for the review + merge 👍


text:
image question

I want to (in macOS app) take a screenshot and add it to my MacawView view. I'm only seeing SVG format. What about png format images?
I tried to load my images this way. I get no error but also no image is visible:
mycanvas.wantsLayer = true
mycanvas.layer!.contents = NSImage(named:NSImage.Name(rawValue:"testimage"))
Any ideas?

Hi Douglas,
Just use Image as a node in your MacawView. You may use .image() extension to convert your NSImage to Macaw Image.

Okay, that's a help but the image still isn't visible. Here is a snipit of my test code. The text shows but the image doesn't. I've verified the image is a good path. Any ideas?
required init?(coder aDecoder: NSCoder) {
let text = Text(text: "Hello, World I'm back and I'm loving it!",place: .move(dx:145,dy:100))
let destination = "/var/folders/bm/c45r8p1n3mj6qnz5r79866vr0000gn/T/Madshot/1519937031137_shot.png"
let img = Image(src: destination)
let group = Group(contents: [text,img], place: .move(dx: 20,dy:75))
super.init(node: group, coder: aDecoder)
}

I recommend you to try following:

Set image width/height
Debug Macaw code and make sure that Image.image() method load your image correctly

Hope it will help.

Looks like you're trying to load image by path while Image(src:) loads image by name. You may use the following code instead:
let img = NSImage(byReferencingFile: destination).image()

Yes that is it. Thank you so much  @ystrot . :)

authors: DouglasGLewis ystrot

repo: exyte/Macaw


text:
addon breaks login to the archlinux aur

While the addon is enabled I get

400 - Bad Request
Bad Referer header.

When I try to login to the aur:
https://aur.archlinux.org/

OK I'll make an aur account and figure our what I can do.

Hm. Some mysteries involved here still, I am able to log into the AUR using my daily driver Firefox+I2PIPB with my newly created AUR account. Let's try and narrow it down a bit more:

What is your Firefox version?
Are you using a Firefox variant(Icecat, LibreWolf, etc)?
Are you in a "regular" tab or an "I2P Browsing" tab?
Have you modified about:config?
Are you using any other extensions?

Distro: archlinux
Name            : firefox-developer-edition
Version         : 131.0b9-1
step 1:  run firefox with parameter
firefox --ProfileManager
step 2: create new profile
step 3: download extension from
https://addons.mozilla.org/en-US/firefox/addon/i2p-in-private-browsing/
Don't install any other extension, don't modify about:config.
step 4: change default homepage, new windows and tabs to "Firefox Home (default)", so we can also browse the normal web.
step 5: go to https://aur.archlinux.org/, login
result:

Issue found and fixed on master. Release will be made soon.

Release today should have the fix out to users. Please let me know if it works so I can close the issue.

Observed to be fixed here. Please re-open if the issue recurs.


text:
🛑 AUR Repo is down

In d0c9c25, AUR Repo (https://aur.eyenx.ch/x86_64/eyenx.db.tar.gz) was down:

HTTP code: 404
Response time: 532 ms

Resolved: AUR Repo is back up in c29e6d4.

repo: eyenx/upptime


text:
🛑 AUR Repo is down

In 3c92860, AUR Repo (https://aur.eyenx.ch/x86_64/eyenx.db.tar.gz) was down:

HTTP code: 404
Response time: 392 ms

Resolved: AUR Repo is back up in 3cc393c.


text:
Retrieve all users

Thanks for this great plugin! I am wondering if it is possible to retrieve all users using the plugin.
Thanks in advance

I highly doubt that this is possible, whats the use case?

This doesn't sound effective since you would have to fetch the data of all users to get a single integer-value. Imagine having a big database with a few thousand or even more entrys.
I would recommend you to make a seperate realtime-database with an count-entry that gets refreshed/edited with every registration.

Thanks @actopozipc . I implemented that approach and it worked very good. Thanks for the recommendation. :)

authors: actopozipc vhugogarcia


text:
Bug: Share icons not showing up

Can no longer replicate

authors: fabioelia trybick


text:
[DART 2] Rename @Henson --> @HensonNavigable

It is confusing as Henson is also the name of the generated class.

This annotation should also allow to define a model class.
By this I mean that :

in Activity A, we use a pojo model to store the @InjectExtra annotated fields
the model can be injected via dart by Dart.inject(model, this) inside A's onCreate
but Henson can't generate the intent builders + henson go to method for A.
--> we should allow A to be annotated with @HensonNavigable(model = "Model.class") so that the annotation processor of Henson knows where to find the InjectExtra and generete the intent builder and go to method for A using the Model class annotated fields.

Model class has been added, it's tested and works well.


text:
Unable to zoom using dolly when it's orthographic

Is your feature request related to a problem? Please describe.
When it's in perspective I zoom using dolly, so moving the camera closer, but when it's orthographic it's not possible to zoom.
Describe the solution you'd like

A generic function to zoom, that handles both orthographic and perspective
Exposing VtkCamera.SetParallelScale to change the zoom in orthographic. This is what it's done in the app here
A function only to zoom when orthographic similar to the other functions where you only pass the delta and not the final value
Recompute the parallel scale internally when Dolly(), SetPosition(), and SetFocalPoint() are called if the camera is orthographic (and any other methods that affect the position-focal distance), this would not change the API

Also a function to be able to save the settings without rendering would be possible, because it would let me change to perspective, save, dolly and change back. Now it needs to render to be able to save.
Additional context
This is what I have done to make it work:
https://github.com/Nokse22/Exhibit/blob/3f6b2118d0365da4eeab1e8cc87d760cb5c54dbd/src/window.py#L190-L194

wdyt @Meakk ?

for reference:

vtkCameras zoom method changes the view angle in perspective mode and the parallel scale in parallel mode
vtkInteractorStyleTrackballCamera's dolly medhod moves the camera in perspective mode and changes the parallel scale in parallel mode
in F3D there's a heuristic (copied from somewhere in VTK) to match the distance and the parallel scale when changing modes

authors: Nokse22 mwestphal snoyer


text:
Component | Crosshair: Add stroke-width CSS variables

New Crosshair CSS variables:

--vis-crosshair-circle-stroke-width with the default value of 1px.
--vis-crosshair-line-stroke-width with the default value of 1px.

@yanneves Thanks for the contribution!

@yanneves Release v1.2.1-beta.0 with your changes

authors: rokotyan yanneves


text:
[RFE] add confObjArray to the view

Like the main vscode-f5 extension config explorer, it would be nice to be able to easily see the parsed json object of the ns configs.  this will allow users to parse the full tree in other tools

this was added in v1.7.0


text:
Made the Example more readable in the readme

Made the readability better and code example shorter in the readme (Example)

Thank you for your contribution. However, the export validators does not exist in Valibot. With your changes, the code example is broken.

Ok sorry,I felt that validators do exist in valibot, I would close this PR then.

repo: fabian-hiller/valibot


text:
fixes #805

@metacosm and @inoxx03 mind taking a quick look and approving initial merge?
We can test generation after this is merge and @gastaldi does a small update.

LGTM

merging.

@rhoads-zach LGTM (Sorry, got distracted and forgot to click 'Approve' until it was too late)

authors: inoxx03 metacosm rhoads-zach


text:
Tiny fixes

See commit messages :-)

Can one of the admins verify this patch?

Thanks @inoxx03!

merged: bcb6003756d0c4f991274d48cf4eb5f1d655e373

authors: Ladicek centos-ci inoxx03


text:
Remove "productized" comments from community branch #220

Signed-off-by: Aurélien Pupier apupier@redhat.com

@rhuss hope that this is OK for you.

Actually, I'd prefer fix that issue ;-) Ass mentioned in #220 the RHEL variation is really meant for production so should refer to productised environments. We don't build or offer RHEL variatons on Docker Hub, so that should be fine.

authors: apupier rhuss vorburger


text:
Redeploy of project fails if using PVC and already present on cluster

Description
When my service uses a PVC, which has already been created in openshift, then the redeploy fails because its tried to update the PVC. I use the Technical Preview of Redhat Integration Service 2.0.
I'm not sure if there is a setting I'm missing, or if this is a bug.
Info

IDE:  IntelliJ 2017.3.4 Ultimate
Maven: Intellij Bundled Maven 3
Fabric8:  fabric8-project-bom-camel-spring-boot:2.2.170.redhat-000022, fabric8-maven-plugin:3.1.80.redhat-000022
OpenShift Master: v3.6.0+c4dd4cf
Kubernetes Master: v1.6.1+5115d708d7
Sample Project: git@github.com:cchet-thesis-msc/integration-service-conax.git
**  Use settings.xml located in /configuration folder
** clean install fabric8:deploy // fails if service already deployed to cluster

Error Log

[INFO] F8: Using OpenShift at https://10.0.75.2:8443/ in namespace fis with manifest D:\repositories\Github\cchet-thesis-msc\integration-service-conax\target\classes\META-INF\fabric8\openshift.yml
[INFO] OpenShift platform detected
[INFO] Using project: fis
[INFO] Updating a Service from openshift.yml
[INFO] Updated Service: \target\fabric8\applyJson\fis\service-integration-conax.json
[INFO] Updating PersistentVolumeClaim from openshift.yml
[ERROR] Failed to update PersistentVolumeClaim from openshift.yml. io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PUT at: https://10.0.75.2:8443/api/v1/namespaces/fis/persistentvolumeclaims/data. Message: PersistentVolumeClaim "data" is invalid: spec: Forbidden: field is immutable after creation. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec, message=Forbidden: field is immutable after creation, reason=FieldValueForbidden, additionalProperties={})], group=null, kind=PersistentVolumeClaim, name=data, retryAfterSeconds=null, additionalProperties={}), kind=Status, message=PersistentVolumeClaim "data" is invalid: spec: Forbidden: field is immutable after creation, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).. PersistentVolumeClaim(apiVersion=v1, kind=PersistentVolumeClaim, metadata=ObjectMeta(annotations=null, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={provider=fabric8, project=integration-conax, version=1.0-SNAPSHOT, group=com.gepardec.sypoc}, name=data, namespace=null, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), spec=PersistentVolumeClaimSpec(accessModes=[ReadWriteOnce], resources=ResourceRequirements(limits=null, requests={storage=Quantity(amount=100Mi, format=null, additionalProperties={})}, additionalProperties={}), selector=null, volumeName=null, additionalProperties={}), status=null, additionalProperties={})
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PUT at: https://10.0.75.2:8443/api/v1/namespaces/fis/persistentvolumeclaims/data. Message: PersistentVolumeClaim "data" is invalid: spec: Forbidden: field is immutable after creation. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec, message=Forbidden: field is immutable after creation, reason=FieldValueForbidden, additionalProperties={})], group=null, kind=PersistentVolumeClaim, name=data, retryAfterSeconds=null, additionalProperties={}), kind=Status, message=PersistentVolumeClaim "data" is invalid: spec: Forbidden: field is immutable after creation, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:314)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:267)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:236)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:229)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleReplace(OperationSupport.java:213)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleReplace(BaseOperation.java:585)
at io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation$2.apply(HasMetadataOperation.java:87)
at io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation$2.apply(HasMetadataOperation.java:82)
at io.fabric8.kubernetes.api.model.DoneablePersistentVolumeClaim.done(DoneablePersistentVolumeClaim.java:26)
at io.fabric8.kubernetes.api.model.DoneablePersistentVolumeClaim.done(DoneablePersistentVolumeClaim.java:5)
at io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation.replace(HasMetadataOperation.java:94)
at io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation.replace(HasMetadataOperation.java:32)
at io.fabric8.kubernetes.api.Controller.applyResource(Controller.java:879)
at io.fabric8.kubernetes.api.Controller.applyEntity(Controller.java:282)
at io.fabric8.kubernetes.api.Controller.apply(Controller.java:225)
at io.fabric8.maven.plugin.mojo.build.ApplyMojo.applyEntities(ApplyMojo.java:461)
at io.fabric8.maven.plugin.mojo.develop.RunMojo.applyEntities(RunMojo.java:55)
at io.fabric8.maven.plugin.mojo.build.ApplyMojo.executeInternal(ApplyMojo.java:413)
at io.fabric8.maven.plugin.mojo.AbstractFabric8Mojo.execute(AbstractFabric8Mojo.java:77)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Can anyone help me with this issue ?

I had an invalid deployment.yml file, but redhat release '3.1.80.redhat-000022' did not warn me about that, but release '3.5.38' did.
I had

      volumeMounts:
        - mountPath: /data
          name: data
      volumeMounts:
        - mountPath: /config
          name: config

instead of

      volumeMounts:
        - mountPath: /data
          name: data
        - mountPath: /config
          name: config

So was a copy paste issue :)


text:
Fix #1360: Namespace missing in generated DeploymentConfig

Fix #1360

We should think about a different solution for #1360 as adding the current namespace to all resources (which should be independent of the target environment) is not the proper way to go (see comments above).

authors: rhuss rohanKanojia


text:
fix(space-wizard): ux format of generator results

add generated results formatting to make it easy to read

Can one of the admins verify this patch?

[test]

authors: centos-ci joshuawilson mitchharpur


text:
Account

Phone is often empty
when it is selected in the left bar, show all the account. If a single Account is selected show only it in the details panel

Fixed, see commit e144370.


text:
Can I use WS2811 LED strip?

Hi, thanks for your great job.
btw, I have a question.
I used ws2811 led strip, and it looks working good, but the designated color is not matching.
You can look over my result on the following link.
http://cafe.naver.com/msxboxone/765
Could you please give me a hint to solve the problem?
Thank you in advance.

the video on this page was very helpful, I hope this was adrilight :-)
from what I can see, it looks like the red channel is correct, but the blue and green channels might be swapped. This is most probably a "difference" between different LED strips.
see this line: https://github.com/fabsenet/adrilight/blob/deca9c2f016b84870e7499d2b5ed3a2501a34e71/Arduino/adrilight/adrilight.ino#L38
What you should try in the adrilight.ino is to change
FastLED.addLeds<WS2812B, LED_DATA_PIN, GRB>(leds, NUM_LEDS);

to (BRG):
FastLED.addLeds<WS2812B, LED_DATA_PIN, BRG>(leds, NUM_LEDS);

and/or (WS2811):
FastLED.addLeds<WS2811, LED_DATA_PIN, BRG>(leds, NUM_LEDS);

please make sure, to compile und upload the changed code after each step :-)
this looks like the best bet but you might also try this:

try both light modes: linear and non-linear
make sure, your led offset is correct (this defines, where the first led is and what orientiation your led strip goes from there)

Let me know, what has helped!

Maybe, the blue is correct, but the other channels are swapped, so please try RGB as well.
If you cannot make it work, please provide a picture, where the overlay mode is enabled.

Thank you very much for your detailed explanation.
I will try again and let you know the result. ;-)

I 've changed the code regarding to your comment, and everything goes fine.
FastLED.addLeds<WS2812B, LED_DATA_PIN, GRB>(leds, NUM_LEDS);
to (BRG):
FastLED.addLeds<WS2812B, LED_DATA_PIN, BRG>(leds, NUM_LEDS);
Thank you very much. ;-)
-> http://cafe.naver.com/msxboxone/843

repo: fabsenet/adrilight


text:
Add  to HTML pages

Motivation
All modern HTML pages should be served with <doctype HTML> in order to trigger standards mode in browsers.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan

Loaded the website locally (that's how I found out we needed to serve main.css with the proper content-type.
Built the website into static files and loaded the page via a local Python webserver.

Related PRs
Based on #382 by @tonours.

@yangshun Would we close #382 as well when this merges? And we would also close #383 as well.
Definitely merge this when you are ready.

Oh yes, I'll close #382 and #383 when this is merged 😄

authors: JoelMarcey yangshun

repo: facebook/Docusaurus


text:
npx create-react-app my-app not successful

node:internal/modules/cjs/loader:998
throw err;
^
Error: Cannot find module 'block-stream'

Managed to resolve.

Managed to resolve.

repo: facebook/create-react-app


text:
proxy changeOrigin set to true by default

Is this a bug report?
No
Expected Behavior
When configuring the proxy setting in package.json to a string, requests to should not changeOrigin as false is the default setting in node-http-proxy.
Actual Behavior
changeOrigin is enabled by default.
Potential Solutions

Disable changeOrigin by default for simple string proxy configuration.
Add documentation to the User Guide to alert users that this will occur and what it means.

Can you explain this more? What behavior does this turn on? Why is it bad?

I have a file server running tus-node-server sitting behind my application server that I proxy to for file uploads and downloads. Tus by default reads the origin header to dynamically generate a location to ask the client to send requests to going forward.
I had to spend some time debugging the problem I was having where my file server was sending back locations that were relative to my application server and not the client. While the fix is simple enough, it was not documented, nor is it the default behavior for the packages running the proxy under the hood.
I'm not sure why a system would want to change the default behavior seeing as this is a proxy. Wouldn't all consumers of the proxied request want to know the original origin by default? I don't know what value there is in masking it.
Ultimately, I would like to either have the CRA default match the underlying tooling defaults or at the very least have documentation helping advanced proxy users know that CRA alters the default behavior without them having to read the CRA source code.

Looks like this is no longer an issue as it appears the proxy key in package.json has been removed in v2 in favor of the more flexible proxySetup.js. If that is the case, this issue is no longer valid. Thanks!

There's still support for a "simple" proxy key, but indeed advanced configuration is now fully flexible.

It may be worthwhile to note this in the guide then. 🤷♂

Added to https://github.com/facebook/create-react-app/issues/5127.

You're also welcome to PR :-)

authors: SavePointSam Timer gaearon


text:
Create React App builds empty document (blank screen) with react-router

Hi!
I started creating an app with create-react-app and using react router and  firebase.
Everything was working fine 2 days ago, and since yesterday it just shows me a blank screen, but I didn't change anything.
I have been looking everywhere on my app and in internet but I don't find the problem.
below is my App file and my package.json file.
return (             <Router basename='/numbr'>                 <Route exact path={ROUTES.SIGN_IN} component={ConnectScreen} />                 <Route path={ROUTES.HOME} component={HomeScreen} />             </Router>         );
Thanks in advance for your help!

do you have a link to the app?

@bugzpodder I just created a github repo, it s called Numbr.
I took of the firebase.js file because I had all my private config in it.
Thanks in advance for your help!

#7486

authors: bugzpodder rosanche


text:
add command to add files to staging after eject

#5953 - This adds the scripts & config folder to the git staging area after the app is ejected.

I think thats a good suggestion Would something like this suffice?
if [ -z "$(git diff --staged --name-only)" ]; then exit 1; fi

Yes, a git command like that should do it. I'm not a bash expert but I think you can do something like test -z "$(git diff --staged --name-only)". That basically does exactly what your if is doing and I believe will exit the script if the test fails. We're doing something similar in the exists method in e2e-simple.

I imagine if this fails it's not a big deal? Maybe we can remove the log info and wrap it in a try catch that swallows the error?
Also, we need the git detection before trying this right?

That's a good catch @timer. Wrapping it in a try catch would serve as a git detection as well.
I went ahead and moved the git add into a separate function & only doing the logging if it succeeds;

Please add the test that we discussed earlier.

Thanks!

authors: Timer clickclickonsal iansu


text:
Pin babel-preset-react-app to to core-js minor '3.5' version and add a peer dependency

Specified the minor version as recommended by core-js docs
Removed comment about core-js@3 upgrade
Added peer dependency on core-js from babel-preset-react-app.

Did some due dilligence and see react-error-overlay and react-scripts both directly depend on babel-preset-react-app but do not have a direct dependency on core-js. They do both have direct dependencies on react-app-polyfill that in turn depends on core-js.
From my testing:

npm doesn't complain about the peer depenency being unmet, guessing because it sees core-js in the dependency tree from react-app-polyfill
yarn does warn about the peer dependency being unmet, this seems more correct than npm's behaviour.

Forgive my ignorance but I don't know if babel-preset-react-app is expected to be usable without core-js? If not does that suggest react-scripts and react-error-overlay should have a direct dependency on core-js too?
closes #8875
closes #8779

Now the peerDependency on core-js has been added, can this one go as part of the next milestone @ianschmitz? Think it would warrant a major version bump of babel-preset-react-app.

PR is not stale, changes to my knowledge are good. Just needs review and release.
Can we get a breaking change and bug fix label added to this PR?

PR is not stale :)

Have had to workaround this issue in another project. @ianschmitz / @iansu Is this something can be considered for the 4.1 milestone as a major version release to babel-preset-react-app?

Resolved conflicts. PR is not stale.

Resolved conflicts. PR is not stale.

Maybe change version to 3.8? :)

Maybe change version to 3.8? :)

Maybe change version to 3.8? :)

We can go to 3.6 since that is the latest minor version that react-app-polyfill is pulling in

Maybe change version to 3.8? :)

We can go to 3.6 since that is the latest minor version that react-app-polyfill is pulling in

As I see react-app-polyfill has "core-js": "^3.19.2", in dependencies, so we can change version to 3.19?

I need corejs 3.17 for my project,
it would be great to update it to 3.19!

authors: Mrman Semigradsky xprommer


text:
Allow styling to target specific sidebar level

🚀 Feature
Add unique class names for each sidebar dropdown level.
Have you read the Contributing Guidelines on issues?
Yes
Has this been requested on Canny?
No
Motivation
I'm building a site and trying to mimic the gitbook design: https://docs.luxalgo.com/lux-algo-premium-indicators/lux-algo. Each level of the sidebar has a different margin, font weight, color, etc., which can't be realized with the current API. Also requested in #4966 is a "sidebar title", which can be implemented as a differently styled label.
Another use-case is to add an SVG icon as a :before element.
API Design

I see two solutions:

Allow passing a className attribute in sidebar item definition.

PROs:

More granular control of each label;
Less code to implement;
No risk of BC

CONs:

For auto-generated doc links, this has to be in the front matter, not sure if that's great;
More code to maintain on the user side, more code duplication

Add a menu__link-level<n> class name to each level of sidebar item.

PROs:

Works OOTB: user only need to provide CSS rules through custom.css

CONs:

User loses control of individual labels, which means we can't use CSS to add icons.

Have you tried building it?
Can be implemented by swizzling the sidebar, but feel like that would be too much

We could support both className + a levelX class.

For className, we could have a generic system in frontmatter to enrich sidebars with doc frontMatter. This means we may need to migrate from sidebar_label to something like we did for blog authors:
sidebar:
  label: 'xyz'
  className: '...'

We could add className for in _category_.yml too, that may be good enough in the beginning considering users can use selectors for the direct childs (.category-level3 > .item)

For levelX classname, this should rather be theme-agnostic and be added to ThemeClassNames, menu__link-level<n> looks like it's following the Infima convention so not sure that name is good (+ we don't have this class in Infima)

Another use-case is to add an SVG icon as a :before element.

We could also try to make it easier to do that with swizzling by splitting into more theme components?

Also requested in #4966 is a "sidebar title", which can be implemented as a differently styled label.

I'm not 100% sure to understand what is requested here. A non-collapsible category label isn't already solving this? Do we need to introduce a new attribute?

I'm not 100% sure to understand what is requested here. A non-collapsible category label isn't already solving this? Do we need to introduce a new attribute?

The non-collapsible category only creates a "label" and all subitems are indented. If you look at the Gitbook design, the title is gray, uppercased, and bold, and its subitems aren't indented—and semantically, it's only a separator, not a category label, if that makes sense. Of course even with level-specific styling we can't make the subitems unindented, but at least we are somewhere closer to that

What I understand is that it's mostly a styling feature, and we'd have to prevent "impossible configs" like {type: "category", title: "xyz", collapsible: true}.
Also, how does nested on more than 2 levels work with this feature on GitBook? What happens if we nest a title inside a title: if there's no indentation or font decrease, how do we make it clear one is the parent of another?

authors: Josh-Cena slorber

repo: facebook/docusaurus


text:
docs: install typedoc for generating API docs

Motivation
Close #6649. Since we have JSDoc, we can use TypeDoc to autogenerate these APIs.
I would investigate how we can make it emit nicer Markdown—probably need to eventually fork the plugin and make lots of customizations.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
https://deploy-preview-7060--docusaurus-2.netlify.app/docs/api-next

That looks interesting.
The problem is that most theme-common is currently not a public API surface.
If we document this officially on our website then users will start using internal APIs and we'll be in trouble.

Ugh, looks too hard to maintain in the long run. Let's just hand-sync the docs instead.


text:
[RFC] Prop to transform pasted text

A missing use case for Draftjs i've ran into a couple times is that when text is pasted, there are ways to override the default paste handler and do your own thing.
That said, overriding the default paste handler means you have to manage your own fragment, have logic to handle html potentially, and then insert the blocks you generate in the proper place relative to the cursor and selection. For a lot of use cases, this seems overkill?
An example: (And the reason I'm posting this RFC) is that I'm trying to turn leading tabs into spaces when pasting markdown lists, since they can't be parsed. Users can't actually type a tab so this is only a problem on pastes. Reimplementing the paste handler for this is doable but using the proposed method, it's implementation becomes a oneliner.
Example API
type FormatPastedTextFn = (
  text: string,
  html: ?string,
) => {text: string, html: ?string},

// this replaces every vowel with a happy face
<DraftEditor
  {...otherProps}
  formatPastedText={text => {
    return {
      text: text.replace(/[aeiou]/gi, '😊'),
    };
  }}
/>

Precedent
There's some precedent to this type of handler. blockRendererFn and blockStyleFn both plug into a similar way, overriding the default implementation if they are in place.
Then  handlePastedText of course works similarly and I went ahead and copied its signature, when it comes to naming formatPastedText, all handle* functions return a handle, which is not what we want in this case.
Open q's
Handling html might be a bit smelly? it is doable but you really don't wanna transform raw html to raw html, at that point you do wanna replace the paste handler.
What I've done is that it's the responsibility of formatPastedText to pass the html result through or eat it up and return undefined, formatting only the static text.
An option here is to make formatPastedText text only (formatPastedText(text)=>text), if this prop is in place we ignore all html automatically, and that simplifies the signature.

Thank you for putting this up @walaura! From a maintainer's perspective I think your proposal is good as-is but let's see if people have any strong arguments against it. I'd especially love to hear from folks who currently override editOnPaste and have to duplicate (i.e. copypasta) a lot of behavior to perform trivial text transform if this approach would be beneficial to them as well.

Sorry for the delayed response. Was thinking about it for a bit because in general, I think erring on the side avoiding increasing the API surface area tends to be better. On that vain, I was wondering if we could achieve this with a helper function that has your signature, but sits on top of the current API. Something along the lines of:
<DraftEditor
  {...otherProps}
  handlePastedText={pasteWithFormatter(({text}) => {
    return {
      text: text.replace(/[aeiou]/gi, 'x'),
    };
  })}
/>

But this doesn't look like it'll be possible though because handlePastedText can't modify state.
The addition of formatPastedText seems simple enough and tbh I think it'll be fine. I have no objections, happy to accept this. 👍

This new prop will need a PR for TypeScript types in the DefinitelyTyped repo as well. We don't actively manage TS types for Draft, but feel free to prepare one if you like 🚀

oki!

Hey, awesome!
I'm gonna go ahead and close this issue since this change got merged (not sure if it needs a version bump or something?) and i'll get to the type defs in the afternoon

Yes I'd say this would require a minor version bump, but we can take care when approaching the next release 👍

authors: claudiopro mrkev walaura

repo: facebook/draft-js


text:
Adding event listeners throws errors

This code used to work
const form = document.getElementById('some-form');
form.addEventListener('keypress', (e) =>
    if (e.keyCode === 13) {
        this.doSomething();
    }
    return;
});

Now I got this error (flow pulled from master):
 90:         form.addEventListener('keypress', (e) => {
             ^ call of method `addEventListener`
 90:         form.addEventListener('keypress', (e) => {
                                               ^ arrow function. This type is incompatible with
 66:     addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
                                                  ^^^^^^^^^^^^^ union: object type | EventHandler. See: /tmp/flow/flowlib_312e97dd/dom.js:66

Converting to function with bind(this) doesn't help
 90:         form.addEventListener('keypress', function(e)  {
                                               ^ call of method `bind`. This type is incompatible with
 66:     addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
                                                  ^^^^^^^^^^^^^ union: object type | EventHandler. See: /tmp/flow/flowlib_312e97dd/dom.js:66

Typing e as Event doesn't work
 91:             if (e.keyCode === 13) {
                       ^^^^^^^ property `keyCode`. Property not found in
 91:             if (e.keyCode === 13) {
                     ^ Event

Typing e as KeyboardEvent doesn't work, since EventHandler function wants Event
 61: type EventHandler = (event: Event) => mixed
                                 ^^^^^ Library type error:
 61: type EventHandler = (event: Event) => mixed
                                 ^^^^^ Event. This type is incompatible with
 90:         form.addEventListener('keypress', (e: KeyboardEvent) => {
                                                   ^^^^^^^^^^^^^ KeyboardEvent. See: (the address of the file):90

What I ended up doing is setting it as Event and doing this
const form = document.getElementById('some-form');
form.addEventListener('keypress', (e: Event) =>
    // flow dancing
    if (!(e instanceof KeyboardEvent)) {
        throw new Error("Strange type error.");
    }
    if (e.keyCode === 13) {
        this.doSomething();
    }
    return;
});

...but that's weird, since keypress can only give KeyboardEvent.
I will try to fix that in the library definition but I am writing it here first

Seems like this might be related to https://github.com/facebook/flow/issues/1155

I think this behavior is actually expected. The fact that we allowed if (x.foo === bar) before when x didn't have a property foo was problematic. We changed that behavior, hence the change, but it's intentional.
Your PR looks promising. Thanks for contributing!

Oops—I definitely didn't mean to close that. Sorry!

As I wrote to the PR - originally it fixed the issue back then, but now even with the PR accepted, I see the same error. It seems like the PR had no effect

It looks like the strange errors you were getting have now been fixed. Let me know if you still have issues 👍

Strangly, I'm getting that error again.
Example
const addEventListener = (type: string, listener: EventListener): void => {
  window.addEventListener(type, listener)
}

addEventListener('keyup', (e: Event): void => {
  switch (e.keyCode) {
    case 40: // arrow down
      console.log('hi')
      return
  }
})

Says
Cannot get `e.keyCode` because property `keyCode` is missing in  `Event` [1].

But it should be there!

authors: ArmorDarks calebmer hwfwalton runn1ng samwgoldman

repo: facebook/flow


text:
Set / Map / $Iterator is incompatible with with spread operand

Flow does not seem to allow spreading of ES6 Map, Set ad Iterator instances:
/* @flow */

const xs = new Set([1, 2, 3]);
const map = new Map();

[...xs];
[...xs.entries()];
[...map];
[...map.keys()];

Here is the output from flow:
scratch.js:3
  3: const xs = new Set([1, 2, 3]);
                ^^^^^^^^^^^^^^^^^^ constructor call
  6: [...xs];
         ^^ Set. This type is incompatible with
  6: [...xs];
         ^^ spread operand

scratch.js:4
  4: const map = new Map();
                 ^^^^^^^^^ constructor call
  8: [...map];
         ^^^ Map. This type is incompatible with
  8: [...map];
         ^^^ spread operand

scratch.js:7
  7: [...xs.entries()];
         ^^^^^^^^^^^^ $Iterator. This type is incompatible with
  7: [...xs.entries()];
         ^^^^^^^^^^^^ spread operand

scratch.js:9
  9: [...map.keys()];
         ^^^^^^^^^^ $Iterator. This type is incompatible with
  9: [...map.keys()];
         ^^^^^^^^^^ spread operand

Dupe of #1059?

Progress is being made here: https://github.com/facebook/flow/pull/1668

authors: Gozala glortho samwgoldman


text:
Flow errors when Array is assigned to an Array field when x subclass of y

Here is the code to reproduce this issue:
class VirtualElement {
  type = "Element"
  children: Array<VirtualElement>
}

class ElementNode extends VirtualElement {
  constructor(children:Array<ElementNode>) {
    super()
    this.children = children
  }
}

Which produces following errors
3:   children: Array<VirtualElement>
                     ^ VirtualElement. This type is incompatible with
7:   constructor(children:Array<ElementNode>) {
                                ^ ElementNode

Maybe I'm missing something, but I would expect this to type while it isn't.

Oddly enough following code type checks
class VirtualElement {
  type = "Element"
  children: Array<VirtualElement>
}

class ElementNode extends VirtualElement {
  constructor(children:Array<ElementNode>) {
    super()
    this.children = [...children]
  }
}

But then performance overhead of this is unacceptable :(

I also tried going with types vs classes, but I run into same issue:
type VirtualElement = {
  type: "Element",
  children: Array<VirtualElement>
}

class ElementNode {
  type = "Element"
  children: Array<VirtualElement>
  constructor(children:Array<ElementNode>) {
    this.children = children
  }
}

Also worth mentioning that problem only occurs when Array is involved for example following code works fine:
interface VirtualElement {
  type: "Element",
  parent: VirtualElement
}

class ElementNode {
  type = "Element"
  parent: VirtualElement
  constructor(parent:ElementNode) {
    this.parent = parent
  }
}

This is correct, it's the classic invariance example:
const dogs: Array<Dog> = getArrayOfDogs();
const animals: Array<Animal> = dogs; // this shouldn't type check, because...
animals.push(new Cat()); // oh no, my dogs array has a cat in it!

I guess what I really wanted was along these lines instead:
class VirtualElement <Child:VirtualElement<*>> {
  type = "Element"
  children: Array<Child>
}

class ElementNode extends VirtualElement<ElementNode> {
  children: Array<ElementNode>
  constructor(children:Array<ElementNode>) {
    super()
    this.children = children
  }
}

Here's a simpler test case
class Base {
  id: string;
}

class Test extends Base {
  id: string;
}

const getFirst = (t: Array<Base>): Base => {
  return t[0];
};

const b = new Test();

// This works
getFirst([ b ]);
// This works
const bArray1 = [ b ];
getFirst(bArray1);
// This does not work
const bArray2: Array<Test> = [ b ];
getFirst(bArray2);

output
11: const getFirst = (t: Array<Base>): Base => {
                               ^ Base. This type is incompatible with
23: const bArray2: Array<Test> = [ b ];
                         ^ Test

Closing, not a bug

@vkurchatkin I think maybe morphing this bug into providing better error message would be better than just closing. Once you consider mutation as pointed out by @erikdesjardins behavior starts to make sense, but often times people (at least on my team) tend to not consider that, partially due to algebraic data types being mostly available in languages that are free of this problem due to immutability. I would highly recommend include that in error message.

authors: Gozala erikdesjardins qimingweng vkurchatkin


text:
Install iTorch on MAC

Does any one successfully installed the iTorch on MAC? I got the ERROR: "Error: Could not satisfy dependency: lzmq >= 0.4.2" when run the luarocks make commands. I just follow the install steps in the document:
brew install zeromq
brew install openssl
luarocks install luacrypto OPENSSL_DIR=/usr/local/opt/openssl/
git clone https://github.com/facebook/iTorch.git
cd iTorch
luarocks make
Could anyone help? Thanks a lot.

@kemaswill a full log of your install will help.

authors: kemaswill soumith

repo: facebook/iTorch


text:
Cyclic ES6 imports make tests fail

🐛 Bug Report
If a project uses untranspiled ES6 imports, tests in test files with cyclic imports fail to run. Test files that use only non-cyclic imports run fine.
(Issue requested here.)
To Reproduce

Clone this repo.
Run npm i
Run npm run-script test

Expected behavior
All tests successfully run.
Link to repl or repo
https://github.com/mik-jozef/jest-cyclic-imports
envinfo
  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
  npmPackages:
    jest: ^26.1.0 => 26.4.1

(Relevant) contents of the repo:
// a.js
import './b.js';

// b.js
import './a.js';

// ok.js
export const x = 42;

// t-ok.test.js
import './ok.js';

test('dummy test without cyclic imports', () => {})

// t-fail.test.js
import './a.js';

test('dummy test with cyclic imports', () => {})

// package.json
{
  "scripts": {
    "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
  },
  "license": "MIT",
  "dependencies": {
    "jest": "^26.1.0"
  },
  "type": "module"
}

(Note: I just discovered it would suffice if a.js imported itself, but that seems a little artificial.)

I encountered this bug when one of my ES6 imports became cylic.

authors: mik-jozef rmbagel

repo: facebook/jest


text:
Docs says config can be JS, but seems to need JSON

The documentation on https://facebook.github.io/jest/docs/en/configuration.html says:

Jest's configuration can be defined in the package.json file of your project, or through a jest.config.js file or through the --config <path/to/js|json> option.

And also says:

Please keep in mind that the resulting configuration must be JSON-serializable.

I tried making the configuration a JS file and it choked till I made it a JSON file. Is it possible to use a JS config or are the docs wrong?

Can you send a repro so we can test it?

@anselmbradford Did you try the following structure in the JS file?
module.exports = {
    "verbose": true,
    "automock": false,
    "transform": {
        "^.+\\.jsx?$": "babel-jest",
        "^.+\\.*ss?$": "<rootDir>/node_modules/jest-css-modules"
    },
    "roots": [
        "<rootDir>/src"
    ],
    "moduleFileExtensions": [
        "js",
        "jsx",
        "json"
    ],
    "moduleNameMapper": {
        "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
        "\\.(css|less)$": "identity-obj-proxy"
    },
    "collectCoverageFrom": [
        "src/components/**/LinkItem.jsx"
    ],
    "coverageReporters": [
        "text"
    ]
};

I'm an idiot, it was a typo. Sorry for the heartburn and thanks for the responsiveness.

No problem

authors: anselmbradford micronaut thymikee


text:
Not able to include 3rd party library on my testing env using React.

I'm adding jqxwidgets grid to my react app, so for this ->
on index.html I have:

then in some place in my code, where I render the grid I have this:
render() {
let dataAdapter = new $.jqx.dataAdapter(this.state.source);
return (
    <JqxGrid source={dataAdapter}...
)

And everything works OK.
But then I want to test all this with jest (I am already using it) and first it throws:
ReferenceError: $ is not defined
Then I created a setupFiles and added:
import $ from 'jquery';
window.$ = global.$ = $;
and I get:
TypeError: Cannot read property 'dataAdapter' of undefined
because now jqx is not defined so I've added:
import $ from 'jquery';
import jqx from './jqxcore';
window.$ = global.$ = $;
window.$.jqx = global.$.jqx = jqx;
and after that I get:
TypeError: $.jqx.dataAdapter is not a constructor
....
So everytime is like I'm missing something and I cannot find why the library doesn't work the same way that it does inside the App with only adding the js's on index.htnml.
Any thoughts?

Jest with JSDOM environment does not support importing JS through <script> tags, that's why you need to import them locally in test file.
You're not importing jqxdata and jqxgrid, so probably that's the issue. Hard to tell without a repro, but also this is not a help forum.
Please ask such questions on StackOverflow or our Discord channel, you'll find it on our Help page: https://facebook.github.io/jest/en/help.html

authors: alebahler thymikee


text:
Use react-is in pretty-format

Right now we have manual $$typeof checks: https://github.com/facebook/jest/blob/af1ab24649798bcf0f7ce6ec5b3cf4ba2a53b5eb/packages/pretty-format/src/plugins/ReactElement.ts#L37-L72
It would be cool to instead use react-is

I would like to work on this.

That's awesome @Prabhakar-17! Go for it 🙂

Doing yarn install I am getting weak compilation error. Any idea how to resolve this?

I'd just remove the dependency in jest-leak-detector and ignore the test warnings surrounding it. I've tried to get it to work on a windows image without luck 🙂

@SimenB How can I test my changes to make sure something else is not broken because of the change. yarn test result looks good but anything specific that needs to be done in this case?

If our tests pass, then you're good - we have quite good test coverage on pretty-format. Looking forward to the PR!

There's problem with the @types/react-is package. I have raised an issue here

@types/react is at 16.8.6 in this repo (latest) (updated a few days ago)
https://github.com/facebook/jest/blob/5ba35be3ef64090bae5e04f51fd170529fba3d1a/yarn.lock#L1772-L1778
So that should be fixed?

Hi @SimenB, I took a crack at this. Let me know if you think my changes make sense. https://github.com/facebook/jest/pull/8058
Thanks!

@SimenB Yes, it worked. Will submit the PR

authors: Prabhakar-17 SimenB mackness


text:
diff highlights invalid differences

🐛 Bug Report
When you're comparing two objects and you use expect.any(String) for some keys, and the test fails for some reason, diff highlights all those places where you used expect.any(String) which is very confusing.
To Reproduce
expect([
            {
                a: expect.any(String),
                b: '',
            },
            {
                c: expect.any(String),
            },
        ]).toEqual([
            {
                a: 'foo',
            },
            {
                c: 'bar',
            },
        ]);

Expected behavior
In case of a failure, diff should not highlight expect.any(String).
Link to repl or repo (highly encouraged)
Not available
Run npx envinfo --preset jest
System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Binaries:
    Node: 11.10.0 - ~/.nvm/versions/node/v11.10.0/bin/node
    Yarn: 1.15.2 - ~/src/accidentsint/node_modules/.bin/yarn
    npm: 6.7.0 - ~/.nvm/versions/node/v11.10.0/bin/npm

Duplicate of #6184. Unfortunately way harder to fix atm than it looks

authors: jeysal umarashfaq


text:
Require JSON files from same environment as modules

Fixes #228.
Advice for how to unit test this welcome. I added JSON to the environment mock to make sure existing tests pass, but couldn't figure out how to create a new mocked environment that will let me assert that the issue described in #228 is fixed.

Can this just get merged without new tests? It's taken me a frustrating amount of time to track this down only to find that it's been fixed but not merged for 4 months!
For whatever reason .json files don't pass through the preprocessor, so I can't even try to form a global workaround there.

@dmnd, @spicyj, this looks reasonable. Do we have an existing JSON test to confirm the change is OK?

Yes: https://github.com/facebook/jest/blob/v0.4.1/src/HasteModuleLoader/tests/HasteModuleLoader-requireModule-test.js#L106-L137

OK, sounds good, thanks!

authors: AsaAyers DmitrySoshnikov dmnd spicyj


text:
feat: enable syntax plugins for syntax that works in node

Summary
#9774, only manually. Makes it non-breaking as the peer dep is unchanged. This will enable plugins we don't need which #9774 avoids, but still

Test plan
Not sure this warrants a test...

After https://github.com/nicolo-ribaudo/babel-preset-current-node-syntax/issues/2 we can use the preset, so let's


text:
Bug: Selection not using window of current view

Context

I'm using lexical inside an iframe portal , some functionalities work after #2918, but selection doesn't seem to work. I suspect the reason is not using the window of the current view when reconciliation finished and selection is triggered . Specifically when getting DOM selection here : #L533 because it using this shared/getDOMSelection which is using top window not of the current view.

This can have multiple implications, for exapmle KEY_ENTER_COMMAND not inserting line break ...etc because $getSelection will always return null.

Lexical version: 0.7.1
Steps To Reproduce

this codesandbox includes a lexical editor inside an iframe portal and

  as content, when selected, selection is not triggered by SELECTION_CHANGE_COMMAND
See ToolbarPlugin for logs.

The current behavior
Selection is null on iframe portals
The expected behavior
Should have Selection on iframe portals

@bilobom I think this is fixed by https://github.com/facebook/lexical/pull/3578. Can you try v0.7.3

@cmmartin , I confirm this is working perfectly. thanks @trueadm .

authors: bilobom cmmartin

repo: facebook/lexical


text:
Cannot select inputs inside labels

What are you trying to achieve? (Expected behavior)
Fill radio buttons on a Twitter Bootstrap based HTML.
What do you get instead? (Actual behavior)
Facebook\WebDriver\Exception\ElementNotVisibleException: element not visible
Details
I'm using Laravel Dusk, which uses Facebook Webdriver. Pretty much all browsing, selections and testing are working fine except when I have forms with inputs inside labels, in Twitter Bootstrap.
A basic Twitter Boostrap radio button is:

    <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
    Option one is this and that—be sure to include why it's great

When I try to select it I get
Facebook\WebDriver\Exception\ElementNotVisibleException: element not visible

But if I move the input out of the label tag:

  <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>

    Option one is this and that—be sure to include why it's great

It works fine. And this is something that happens with any kind of input, and even if I create then with IDs:
<input
   type="radio"
   name="sitesActive"
   id="sitesActive3"
   value="2"
>

And try:
$browser->radio('#sitesActive3', '2')

I get
Facebook\WebDriver\Exception\ElementNotVisibleException: element not visible

or
$browser->waitFor('#sitesActive3');

Which gives me a
Facebook\WebDriver\Exception\TimeOutException: Waited 5 seconds for selector [#sitesActive3].

Php-webdriver version: 1.4.1
PHP version: 7.1
Operating system: macOS: 10.12.4
Browser used + version: Chrome Version 58.0.3029.110 (64-bit)

JFYI: both options (input inside and outside labels) are valid according the W3C:
<!DOCTYPE html>

        <meta charset="UTF-8">
        <title>Title of the document</title>

        <form action="/">

                    <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
                    option

        </form>

I am facing a similar issue. My HTML looks like this:

    <input type="radio" id="salutation-0" name="salutation" value="Ms" checked="" data-reactid=".0.0.0.1.1.$0.0">
    Ms

    <input type="radio" id="salutation-1" name="salutation" value="Mr" data-reactid=".0.0.0.1.1.$1.0">
    Mr

Trying the following results in a Facebook\WebDriver\Exception\ElementNotVisibleException: element not visible exception:
$this->webDriver->findElement(WebDriverBy::id('salutation-1')->click();

I did some checks to verify that WedDriver was aware of the element.
$this->webDriver->findElement(WebDriverBy::id('salutation-1'))->getAttribute('name'); // salutation
$this->webDriver->findElement(WebDriverBy::id('salutation-1'))->getAttribute('value'); // Mr
$this->webDriver->findElement(WebDriverBy::id('salutation-1'))->isDisplayed(); // false
$this->webDriver->findElement(WebDriverBy::id('salutation-1'))->isEnabled(); // true
$this->webDriver->findElement(WebDriverBy::id('salutation-1'))->isSelected(); // false

Stopping the test to see the browser window also confirms that the element is visible in the current viewport.
Although not ideal, I ended up using javascript to select the input as suggested in https://github.com/facebook/php-webdriver/issues/374#issuecomment-268804727:
$this->webDriver->executeScript('document.getElementById("salutation-1").click();');

My configuration is:

Selenium: 3.4.0
Chrome browser version: 59.0.3071.115
Chrome driver version: 2.30.477690

I hope this information is useful to someone else and that a non-javascript solution is found.
Thanks for the great work on this language binding.

I think we may be mixing two different thinks together there.

@antonioribeiro please what is the exact PHP code you run? I see you are using the Dusk calls, which may introduce the issue by themselves. Could you please test the same scenario using pure php-webdriver calls? (Ie. $webdriver->findElement(WebDriverBy::id('sitesActive3'))->select() instead of $browser->radio(...)?). So we can exclude Dusk as the cause.

@dinarcon I guess the element may actually not be visible the moment you try to interact with them. React may redraw the element by another one and the one you hold reference to may actually not be visible - which is what is reported from the isDisplayed() method. You may also try this in different browser - could you please try runnig the same scenario with Firefox + Geckodriver? And if you find something, could you please create a new issue - just to not mix things up with the original Dusk issue?

Thanks both of you!

hey..!!! the problem is the class='radio' css in label or div tag, we have to remove it.  something happen with this css property when we use $browser->radio( ).

@OndraM , as you can see here, $browser gives me public access to the RemoteWebDriver instance, so here's the full test method, modified to use PHP-Webdriver for those particular selects:
public function testUsers()
{
    $this->browse(function (Browser $browser) {
        $this->login($browser);

        $browser->click('#menu-reports')
                ->waitForText('Users')
                ->click('#menu-reports-users')
                ->waitForText('Progress summary per user')
                ->assertSee('Modules completed');

            // $browser->driver =
            //   instance of Facebook\WebDriver\Remote\RemoteWebDriver

           $browser->driver->findElement(WebDriverBy::id('sitesActive3'))->click();
           $browser->driver->findElement(WebDriverBy::id('includeDisabled3'))->click();
           $browser->driver->findElement(WebDriverBy::id('includeNonCertifiable3'))->click();

           $browser->press('Apply')
                   ->waitForText('Showing 0 to 0 of 0 entries')
        ;
    });
}

Here`s the error message and callstack:
There was 1 error:

1) Tests\Browser\ReportTest::testUsers
Facebook\WebDriver\Exception\ElementNotVisibleException: element not visible
  (Session info: chrome=61.0.3160.0)
  (Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.4 x86_64)

/Users/antoniocarlos/code/clearitie/clt/vendor/facebook/webdriver/lib/Exception/WebDriverException.php:110
/Users/antoniocarlos/code/clearitie/clt/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:329
/Users/antoniocarlos/code/clearitie/clt/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:535
/Users/antoniocarlos/code/clearitie/clt/vendor/facebook/webdriver/lib/Remote/RemoteExecuteMethod.php:40
/Users/antoniocarlos/code/clearitie/clt/vendor/facebook/webdriver/lib/Remote/RemoteWebElement.php:81
/Users/antoniocarlos/code/clearitie/clt/tests/Browser/ReportTest.php:23
/Users/antoniocarlos/code/clearitie/clt/vendor/laravel/dusk/src/TestCase.php:93
/Users/antoniocarlos/code/clearitie/clt/tests/Browser/ReportTest.php:33

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

And it could not find the element either. As proposed by @hanerjh, if I just remove the class="radio" from the  tag it works, both in Dusk and Vanilla PHP-Webdriver:
So this code works:

    <input type="radio" name="sitesActive" id="sitesActive1" data-action="sitesActive" value="0" data-value="0">
    All sites

and this one does not:

    <input type="radio" name="sitesActive" id="sitesActive1" data-action="sitesActive" value="0" data-value="0" {{ ( ! data_get($filter, 'sitesActive')) ? 'checked' : '' }}>
    All sites

But, (@hanerjh), although it works removing it, which makes no sense to me, without that particular class it's not a Bootstrap radio button anymore, as you can see:
Cheers!

@antonioribeiro Thanks for all the information! This looks definitely weird.
So do I understand correctly you don't run Selenium server, only Chromedriver?
So could you please:

Provide full log output from the chromedriver (when run in verbose mode like chromedriver --verbose --log-path=chromedriver.log)
Try the same but using Selenium server
Try the same scenario with Selenium server + Firefox

Thanks a lot :)

@OndraM ,
Here are the information:

chromedriver.log.gz

stdout+stderr: selenium-and-chrome.log.gz

stdout+stderr: selenium-and-firefox.log.gz

Thank you!

@antonioribeiro 👍  Nice, thanks. (However the Firefox log doesn't seem to contain the part with the element locating - looks like it failed even before it.)
I hope to get some time to reproduce the issue tomorrow. But my guess is this won't be related to php-webdriver, it actually may be an issue in Selenium/Chromedriver itself

Here's a proof of concept, I was able to extract from my App, which may help you see it working in your environment.
This is the failing test case for it:
public function testUsers()
{
    $this->browse(function (Browser $browser) {
        $browser->visit('/')
                ->waitForText('Enabled users')
        ;

        $browser->driver->findElement(WebDriverBy::id('sitesActive3'))->click();
        $browser->driver->findElement(WebDriverBy::id('includeDisabled3'))->click();

        $browser->press('Apply')
                ->waitUntilMissing('Apply')
        ;
    });
}

Thanks for all the information. It looks that the issue is caused by the Bootstrap CSS. The actual radio button is actually not visible, as it is positioned outside of the viewport:
.smart-form .checkbox input, .smart-form .radio input {
    position: absolute;
    left: -9999px;
}

If I disable the bootstrap CSS, it look like this:

So the browser is right, you the element is not visible and thus cannot be interacted. What you actually want to do is to click on the whole parent  or you can click directly on the  element which follows the <input> (and which is the place where Bootstrap renders the "radio-button-like" circle).
// Click on the  using css selector
$browser->driver->findElement(WebDriverBy::cssSelector('#sitesActive3 + i'))->click();
// Click on the parent  using xpath:
$$browser->driver->findElement(WebDriverBy::xpath('//*[@id="sitesActive3"]/..'))->click();

And this also explains why it works without the class - you disable the boostrap css, so you can click on the original radio button.

Oh! Yeah..., I was afraid it could be something simple, and it was. :/
Thanks a lot, @OndraM !

I use ID to mark any radio with function on html.

authors: Him-2C OndraM antonioribeiro dinarcon hanerjh

repo: facebook/php-webdriver


text:
change array, map and row type encoding

Current Array, Map and Row type encoding which uses JSON has a limitation that only not null string can be used as Map keys. Even though JSON is very user and developer friendly, there would be a higher serialization/deserialization cost and doesn't seems to cooperate with other primitive types.
As an alternative encoding, we can simple think Array as the VariableWidthBlock encoded Slice.
So to speak, Array ["a","b","c"] is a VariableWidthBlock having 3 elements and can be easily serialized as Slice through the VariableWidthBlockEncoding.
Map also can be though as an Array of key, value paris [k1, v2, k2, v2, ...] and Row as Array of each fields [field1, field2, ...]
At the future, we could invent more optimized encoding for complex types but Block encoding also looks proven and efficient.

This looks awesome! There seem to be some build errors on your branch though. Could you take a look at those? JsonToArrayCast doesn't compile, in particular

I wrote a quick benchmark (https://github.com/facebook/presto/pull/2274) and tried your PR. It makes the benchmark more than 2x faster :+1:

{{presto-main/src/main/java/com/facebook/presto/type/TypeJsonUtils.java}} was deleted once. I've rebased and fixed the broken build.

Thanks! I'll start reviewing this

Looks like the right approach. Let me know when you've addressed the comments I made, and I'll take another look

Thanks for the valuable reviews. I've also found that ArrayBuilder could be fragile when it's build based on value classes and should be aware of parameter types which it is building. Please review the second commit.

Awesome :) Will take another look tomorrow

Looks good, other than some minor comments.
@dain I tagged you in one of my comments can you look at that?
@miniway let me know when you've addressed these :)

@cberner Thanks for the precise reviews. I've applied all of your comments. Also I squashed several commits into one and made a separate commit for the fix of ExpressionOptimizer

Rebased and added checking Array or Map contains a datetime type at HiveRecordSink

I added more comments to the old commit: https://github.com/treasure-data/presto/commit/f0e6959bd120aee7748f40d4ab596fb22ea06bc3
Also for the presto-orc/pom.xml the presto-spi is no longer optional.  Also, is jackson still required?

Removed jackson and presto-psi optional from presto-orc/pom. @dain I've applied your comments, one major change is removal of BlockBuilder interfaces from ArrayBuilder(now StructBuilder)

Merged. Thanks!

Thank you for reviewing and merging the changes. About the last comment of @martint, I think splitting StructBuilder into 3 different clear classes is good idea. I've been thinking StructBuilder might be convenient but vague. I'm working based on the idea and StructBuilder will be TupleBuilder, ListBuilder and MapBuilder.
'ListBuildercan utilize element type's encoding system. Soarraywill be using theFixedWidthEncodingof BIGINT. ForMapBuilder, logically Map is a list of (key, value) tuple. But if it applies the logical concept directly at serialization. it would have some overhead. Instead of it, it will have have a [ key_block, value_block ]` shape of serialization.
As this change is merged, I'm going to send another pull request soon.

authors: cberner dain miniway

repo: facebook/presto


text:
collapsible sidebar & on page navigation

I have added 2 lines to siteConfig.js in my local env.

onPageNav: 'separate',
docsSideNavCollapsible: true,

I think It have given a nice navigation experience.
How about commit these config lines as default ?

Thanks for the suggestion @hemith!
We have the collapsible sidebar on now - I think the issue with the on page nav is that our doc pages aren't all correctly organized into the correct headers so the nav isn't organized well
We can consider turning it on after #929 👍

authors: hemith rickhanlonii

repo: facebook/react-native-website


text:
CameraRoll.saveToCameraRoll() fatal error

Issue Description
With the CameraRoll library properly linked up I'm calling CameraRoll.saveToCameraRoll() to save an image from a URI and getting the following in xcode:
libsystem_kernel.dylib`__pthread_kill:
0x107a53efc <+0>:  movl   $0x2000148, %eax          ; imm = 0x2000148
0x107a53f01 <+5>:  movq   %rcx, %r10
0x107a53f04 <+8>:  syscall
->  0x107a53f06 <+10>: jae    0x107a53f10               ; <+20>
0x107a53f08 <+12>: movq   %rax, %rdi
0x107a53f0b <+15>: jmp    0x107a4e7cd               ; cerror_nocancel
0x107a53f10 <+20>: retq
0x107a53f11 <+21>: nop
0x107a53f12 <+22>: nop
0x107a53f13 <+23>: nop
No error is caught by the promise -- the .then isn't firing so I can't get any info from a console.log
[FILL THIS OUT]
Expected Results
In iOS 9.3 the image is saved to the camera roll. In iOS 10 I get the above and, when not logging, my app crashes in the simulator.
Additional Information

React Native version: 0.34
Platform(s) (iOS, Android, or both?): iOS 10
Operating System (macOS, Linux, or Windows?): macOS

You have to add NSPhotoLibraryUsageDescription key to info.plist. https://github.com/facebook/react-native/issues/10115

Closing this out as I'm improving the docs to reflect the permissions needs in iOS 10.
As far as I can tell, there still is a real CameraRoll crash that is being tracked in #10115

authors: JohnnyRuvac ericvicenti kevinfreitas

repo: facebook/react-native


text:
IOS:Image not loading with hybrid apps resource

I have a hybrid app in which I am building some ui in React native and other in native ios. I want to add an image in my view. Image is present in images.xcassets of my project. as per below documentation,
https://facebook.github.io/react-native/docs/images.html#images-from-hybrid-app-s-resources
I just need to provide name of the image file and react native should be able to load this image for me. Unfortunately, Image is not loaded in react ui. Document doesn't talk about any constraints for image type or name.

Has anyone faced this problem? any suggestion? Updating document with little more description might be helpful.
React Native version: 0.30

We're cutting down on the number of outstanding issues, in order to allow us to focus. I'm closing this issue because it has been open for over 60 days with no activity. If you think it should still be opened let us know why. PRs are always welcome.

react-native@0.55.4, have not yet tested on production but in debug the issue is still persistent. The only way is to add images in src folder but that's creating a duplicate. Any ideas?

authors: ggsrivas hramos jinshin1013


text:
Cannot run ReactNative app via npm start

Hello,
I just created React Native project using command create-react-native-app app, everything was ok,
then I run command npm start and this is an output:
tomsk@tomsk-U36SD:~/ReactNative/app$ npm start

> app@0.1.0 start /home/tomsk/ReactNative/app
> react-native-scripts start

10:15:17 AM: Unable to start server
  See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
    sudo sysctl -w fs.inotify.max_user_instances=1024
    sudo sysctl -w fs.inotify.max_user_watches=12288

npm ERR! Linux 4.13.0-37-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.13.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! app@0.1.0 start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app@0.1.0 start script 'react-native-scripts start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-native-scripts start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/tomsk/ReactNative/app/npm-debug.log

Log /home/tomsk/ReactNative/app/npm-debug.log is empty.
Please how to fix it?

I provided all important information.

No, you haven't.
We have a template in place exactly for that.
Moreover, the log tells you to install watchman, have you done that?


text:
react-navigation error "invariant violation: invariant violation: scrollview child layout (["alignItems","justifyContent"]) must be applied through the contentContainerStyle prop"

I'm trying to use react-navigation but I get this error "invariant violation: invariant violation: scrollview child layout (["alignItems","justifyContent"]) must be applied through the contentContainerStyle prop"

I googled for solutions but all issues aren't related to react-navigation at all and I don't use anything else yet. I don't even understand the error.!

"react-native": "0.57.8"

"react-navigation": "^3.0.9"

"react-native-gesture-handler": "^1.0.12"

windows 10

android

redmi note 4 - android version 7.0

here are my codes

index.js

import {AppRegistry} from 'react-native'; import App from './App'; import {name as appName} from './app.json'; AppRegistry.registerComponent(appName, () => App);

App.js

import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View} from 'react-native'; import {createAppContainer, createStackNavigator} from 'react-navigation'; import PostsScreen from './components/Posts'; import ToolsScreen from './components/Posts'; import FavouriteScreen from './components/Favourite'; const AppNavigator = createStackNavigator({   Posts: { screen: PostsScreen },   Tools: { screen: ToolsScreen },   Favourite: { screen: FavouriteScreen } }, {   initialRouteName: 'Posts',   }) const App = createAppContainer(AppNavigator); export default App;

Posts.js

import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View} from 'react-native'; import { Container, Header, Content, Button } from 'native-base'; class PostsScreen extends Component {   render() {     const { navigate } = this.props.navigation;     return (       <Container>         <Content style={styles.content}>Posts Screen</Content>         <Button onPress= { ()=> navigate('Tools')} title="Tools"></Button>       </Container>     );   } } export default PostsScreen; const styles = StyleSheet.create({   content: {     flex: 1,     justifyContent: 'center',     alignItems: 'center',   }, });

Tools.js

import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View} from 'react-native'; import { Container, Header, Content } from 'native-base'; class ToolsScreen extends Component {   render() {     return (       <Container>         <Content style={styles.content}>Tools Screen</Content>       </Container>     );   } } export default ToolsScreen; const styles = StyleSheet.create({   content: {     flex: 1,     justifyContent: 'center',     alignItems: 'center',   }, });

Please provide styles to the contentContainerStyle  instead of providing to ScrollView.

@strjoshi sorry, but I can't understand what do you mean. can you explain it more?

@strjoshi thanks! it works. but I still don't understand why, could you please tell me the reason?!

Please provide styles to the contentContainerStyle instead of providing to ScrollView.

A distinct lack of clear examples in the documentation, makes this statement confusing to me, please explain

authors: Nermin-K stevematdavies strjoshi


text:
🐛 [Android][TextInput] combine secureTextEntry + autoComplete props

Description
In Android, when TextInput's secureTexEntry={false} props is combined with autoComplete={'off'} props the keyboard suggestion is showing.
Expected:
As we are passing autoComplete={'off'}, even if secureTexEntry={false} should not show the keyboard suggestion, just password should unmask.###
React Native Version
0.71.4
Output of npx react-native info
warn Package @sentry/react-native contains invalid configuration: "dependency.platforms.ios.sharedLibraries" is not allowed,"dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
OS: macOS 13.1
CPU: (8) arm64 Apple M1 Pro
Memory: 112.63 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.19.2 - /opt/homebrew/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 28, 29, 30, 31, 32, 33
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 32.0.0
System Images: android-25 | Google APIs ARM 64 v8a, android-28 | Google APIs ARM 64 v8a, android-29 | Google APIs ARM 64 v8a, android-29 | Google Play ARM 64 v8a, android-30 | Google APIs ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-32 | Google APIs ARM 64 v8a, android-33 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Create TextInput component with autoComplete={'off'} secureTextEntry={true}
Create TextInput component with autoComplete={'off'} secureTextEntry={false}
Expected Results

secureTextEntry
Keyboard Suggestions Off

true
✅

false
✅

Actual Results

secureTextEntry
Keyboard Suggestions Off

true
✅

false
❌

Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/@endometriose/secure-text-input-suggestion?platform=android

Updated React Native version (v0.71.4), seems like the issue is still persist.

Do you still experience this issue?
I have four years of experience maintaining facebook/react-native and I specialize in the Text and TextInput components. I currently have 58 facebook/react-native PRs.
If you still experience this issue, I will prepare a patched release with the fix.
Thanks a lot


text:
Scroll View Issue

I am having layout issue with ScrollView
When I use View it was displaying like this.
http://collabshot.com/show/Kis4aJ
http://pastebin.com/Yagt8X38
When I changed it to scrollview
http://collabshot.com/show/f3lEtM
http://pastebin.com/zK0HnjaN
And here are the styles
content: {
flex: 1,
paddingTop: 10,
paddingLeft: 10,
paddingRight: 10,
flexDirection: 'column',
backgroundColor: '#000000',
},
transmit: {
height: 100,
borderWidth: 1,
},
messages: {
flex: 1,
backgroundColor: '#ffff00',
}
Looking for help.
Thanks

Hey @georgi-kovachev . thanks for reporting this! You can try setting the contentContainerStyle of the ScrollView.
BTW, there's an awesome place to ask question like this one: StackOverflow. It's the best system for Q&A. Many people from the community hang out there and will be able to see your question, you can vote on answers and mark question as answered etc. This lets us keep a list of bug reports and feature requests on github and especially Product Pains (again, with voting which is really nice).
If you think StackOverflow works for you please consider posting there instead and closing this issue.
I'm posting this here because github issues haven't been working very well for us and because StackOverflow is so much better. Thanks for reading! :)


text:
[iOS] Add support for setReturnKeyType on TextInputs?

I was wondering if it would be possible to add the ability to set the setReturnKeyType of the keyboard when using an TextInput?  Here's a stack overflow that talks about the setReturnKeyType:
http://stackoverflow.com/a/4489893/1078829

https://facebook.github.io/react-native/docs/textinput.html#returnkeytype
$ git grep -i returnKeyType
Examples/UIExplorer/TextInputExample.ios.js:          returnKeyType="next"
Examples/UIExplorer/TextInputExample.ios.js:          returnKeyType="next"
Examples/UIExplorer/TextInputExample.ios.js:          returnKeyType="next"
Examples/UIExplorer/TextInputExample.ios.js:          returnKeyType="done"
Examples/UIExplorer/TextInputExample.ios.js:      var returnKeyTypes = [
Examples/UIExplorer/TextInputExample.ios.js:      var examples = returnKeyTypes.map((type) => {
Examples/UIExplorer/TextInputExample.ios.js:              returnKeyType={type}
Examples/UIExplorer/TextInputExample.ios.js:            returnKeyType="next"
Examples/UIExplorer/TextInputExample.ios.js:            returnKeyType="go"
Examples/UIExplorer/XHRExampleFetch.js:          returnKeyType="go"
Libraries/Components/TextInput/TextInput.js:    returnKeyType: PropTypes.oneOf([
Libraries/Text/RCTTextFieldManager.m:RCT_EXPORT_VIEW_PROPERTY(returnKeyType, UIReturnKeyType)
Libraries/Text/RCTTextViewManager.m:RCT_REMAP_VIEW_PROPERTY(returnKeyType, textView.returnKeyType, UIReturnKeyType)
React/Base/RCTConvert.h:+ (UIReturnKeyType)UIReturnKeyType:(id)json;
React/Base/RCTConvert.m:RCT_ENUM_CONVERTER(UIReturnKeyType, (@{

@ide, thanks. Missed that one.  I even searched the github repository and nothing came up.  Sorry about that.


text:
I cannot get the accessibility working in the default 'Welcome to React Native!" APP

Hi!
I cannot get the accessibility working in the default 'Welcome to React Native!" APP. I added the accessibility attributes to my  tag. Then I run this App and enable VoiceOver, but it reads  every Text alone and not together, as a block of Texts.
In the ReactNative Accessibility documentation says that: "when a view is an accessibility element, it groups its children into a single selectable component". I cannot understand why VoiceOver don´t read the Texts as a block.
Futhermore, VoiceOver don´t read an "accessibilityLabel" attribute.
I cannot found any solution to my problem on the internet. It seems like I am doing some wrong...
This is my code:
render() {
    return (
      <View style={styles.container} accessibility={true} accessibilityLabel="Say something!!">
        <Text style={styles.welcome} >
          Welcome to React Native!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit index.ios.js
        </Text>
        <Text style={styles.instructions}>
          Press Cmd+R to reload,{'\n'}
          Cmd+D or shake for dev menu
        </Text>
      </View>
    );
  }

Test device: Iphone 6 iOS 9.2
React-Native-cli: 0.1.10
ReactNative version: 0.19.0

Sorry! it was my mistake: the tag must be named  "accessible", not "accessibility" –