[Select] moving focus with keyboard ArrowUp or ArrowDown is not working when [disablePortal] is set

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
When I click into a <Select> (with disablePortal) the dropdown opens, but ArrowUp and ArrowDown will not move the keyboard focus to any of the items.
Addendum: I verified that the autoFocus property does not influence the behavior. It does not matter whether autoFocus is set or not.
Expected behavior 🤔
Without disablePortal the behavior is as expected: keyboard ArrowUp and ArrowDown keys will move the focus to the items and between the items.
Steps to reproduce 🕹
I prepared a codesandbox that exhibits the behavior
https://codesandbox.io/s/pensive-cache-xk9js4?file=/src/App.tsx
The relevant usage to elicit the bug is:
<Select MenuProps={{ disablePortal: true }}>
    <MenuItem value="foo">{"foo"}</MenuItem>
</Select>

click into the select
use ArrowDown to move focus into the dropdown. but nothing happens.

Observation:
When disablePortal is set the dropdown paper will receive focus when the dropdown opens. This is not the case otherwise.
Context 🔦
No response
Your environment 🌎
No response

I've developed a workaround that anyone can use until this is fixed.
I listen for the native bubbling DOM event focusin and check if the paper has focus; if this is the case I just focus the first item. Done.
import { useFocusIn } from './useDOMEvent';

// ...

const { ref } = useFocusIn((e: any) => {
    if (e.target.matches('.MuiPaper-root')) {
      const list = e.target.querySelector('.MuiList-root');
      if (list) {
        list.firstElementChild?.focus();
      }
    }
  });

<Select
    {...props}
    ref={ref}
>
    {options}
</Select>

and the custom hook
import { useEffect, useState } from 'react';

export const useDOMEvent = (
  type: keyof GlobalEventHandlersEventMap,
  listener: EventListenerOrEventListenerObject,
  options?: AddEventListenerOptions
) => {
  const [target, setTarget] = useState<any>();
  const { capture, once, passive, signal } = { ...options };

  useEffect(() => {
    if (target) {
      target.addEventListener(type, listener, { capture, once, passive, signal });
      return () => target.removeEventListener(type, listener, { capture });
    }
  }, [target, type, listener, capture, once, passive, signal]);

  return { ref: setTarget };
};

export const useFocusIn = (listener: EventListenerOrEventListenerObject, options?: AddEventListenerOptions) =>
  useDOMEvent('focusin', listener, options);
export const useFocusOut = (listener: EventListenerOrEventListenerObject, options?: AddEventListenerOptions) =>
  useDOMEvent('focusout', listener, options);

Thanks for reporting this issue and the workaround. Would you like to investigate the root cause of this in our Select component?

I would like to give it a try. I can't say when I will find the time though. Maybe next friday.

I forked and cloned the repo today. Currently trying to write a failing testcase for the bug.
working in packages\mui-material\src\Select\Select.test.js
and trying to modify a duplicate of this existing testcase, which seems to be close to what I'm attempting:
it('should focus list if no selection', () => {
    const { getByRole } = render(<Select value="" autoFocus />);

    fireEvent.mouseDown(getByRole('button'));

    // TODO not matching WAI-ARIA authoring practices. It should focus the first (or selected) item.
    expect(getByRole('listbox')).toHaveFocus();
});

Hey, it seems it could also fix the hinting when the user is typing during the opened list. Which also does not work with disablePortal: true. Both are quite impactful for the accessibility of the component

When anyone tackles this issue keep in mind that the first item in the list may not be selectable (i.e. disabled or ListSubhead). Focus should be put on the first selectable item in the list.

Some more behaviour details. Here is a working example for testing.
When portal is enabled (default), keyboard interaction seems to work as expected. Either with opening the dropdown via keyboard (foc on the select pushing the ArrowDown key) or opening it using a mouse.
But when the portal is disabled, then opening the dropdown with a mouse looses keyboard interaction. Mind that keyboard interaction still work if you open the dropdown using the keyboard.

I assume this still isn't fixed? I've got the same problem at the moment. I'll try do the workaround meanwhile and see if that works for me


chore: add updatecli manifests for rating

I missed that 😅
Will change plugin-health-scoring manifests accordingly.

Hum... I should keep updatecli/updatecli.d/charts/rating.yaml though no?

Hum... I should keep updatecli/updatecli.d/charts/rating.yaml though no?

My apologies, I don't why I tought the manifest here was tracking the docker image for rating, while it's the helm chart.
You are correct: this PR is legit!


Bundle latest cfn-lint

I like that cfnLint.path lets you customize which version of cfn-lint the extension uses, but it might help those that haven't installed cfn-lint if the extension bundled the latest version of cfn-lint by default

https://stackoverflow.com/a/106730/1623249

It boils down to: py2exe on windows, Freeze on Linux, and py2app on Mac.


Cumulant Based Inference for higher-order of Correlation (CuBIC) python implementation

This pull request aim to integrate in elephant a module to perform the Cumulant Based Inference for higher-order of Correlation (ref. Staude et al. 2009) for correlation analysis of parallel recorded spike trains and the relative unit tests

This commit applies all the comments until now (thanks @apdavison for the corrections)


Add tests for ContextDependencyTemplateAsId

What kind of change does this PR introduce?

Add tests for ContextDependencyTemplateAsId
Did you add tests for your changes?

This PR is only tests
If relevant, link to documentation update:

N/A
Summary

Based on the coveralls report, the ContextDependencyTemplateAsId file has 79% test coverage. There is no ContextDependencyTemplateAsId specific test file - this is added in this PR and aims to achieve 100% test coverage.
https://coveralls.io/builds/9993625/source?filename=lib%2Fdependencies%2FContextDependencyTemplateAsId.js
Does this PR introduce a breaking change?

No
Other information
None

High code coverage only makes sense if the tests are correct. Having incorrect tests is worse than having lower code coverage...

@sokra

High code coverage only makes sense if the tests are correct.

I agree, although I'd need more details on what you mean by "correct" - an incorrect test to me is one which uses unexpected data, meaning the setup of the tests is incorrect. Is there a particular setup of these tests which doesn't make sense?
The only comment above is on an outputted assertion. The assertion itself can't be incorrect (or the test would fail), so the implication is that in order to get that output unexpected input has been used in the setup. Could you provide some more detail on changes required?

https://github.com/webpack/webpack/blob/master/lib/dependencies/WebpackMissingModule.js#L12
https://github.com/webpack/webpack/blob/master/lib/dependencies/WebpackMissingModule.js#L16
These two lines incorrectly emit double ;. This need to be fixed.

Thanks


WASM/AsmJs: Fix bad cse between signed/unsigned div&rem

Fixes #2975

Remove Mul_UInt opcode
Cleanup Div/Rem helper implementation. Made a Checked and an Unsafe version of the implementation.
Created new OpCode DivU_I4 and RemU_I4 to prevent cse between signed and unsigned div/rem

This change is

ping


normalize_root DOES NOT WORK with SMPLLayer

Hi, Thank you for maintaining nice projects
normalize_root option is not properly working on the SMPLSequence class.
Because when calling self.smpl_layer.forward() in the SMPLSequence.fk()
normalize_root option does not passed to the smpl_layer so that
normalize_root is always the false in the SMPLLayer
https://github.com/eth-ait/aitviewer/blob/65b38da522e86c10e263bbd6e8959a6060dcd7fc/aitviewer/renderables/smpl.py#L400-L407
I think this code should changed like this
verts, joints = self.smpl_layer(
    poses_root=poses_root,
    poses_body=poses_body,
    poses_left_hand=poses_left_hand,
    poses_right_hand=poses_right_hand,
    betas=betas,
    trans=trans,
    normalize_root=self._normalize_root,
)

Thank you

Oh, sorry, there is a transformation for the root trans in
https://github.com/eth-ait/aitviewer/blob/65b38da522e86c10e263bbd6e8959a6060dcd7fc/aitviewer/renderables/smpl.py#L128-L135


Make OrchestratorType case insensitive. After json is unmarshal, do a…

… case insensitive comparison of OrchestratorType in Validate and save OrchestratorType as the defined constant string for future comparison.

This change is

Don't block on this right now, but I don't like how this makes validate change the api model contents. I'd like this to be part of the unmarshalling, but I understand that is much more work. Not sure if there is a different better spot. possibly the call to defaults as that updates the model currently.

@JackQuincy Correct. It is better to do in unmarshalling. Right now we rely on validate right after unmarshal.

If you haven't found it yet, look at this https://golang.org/pkg/encoding/#TextUnmarshaler . If our types implement it json.Unmarshall should be able to corrcet casing for us

@JackQuincy Thanks for the pointer. That's very helpful! I've made the change.


update libraries for REST

javalin updated to 3.10.1

swagger-ui updated to 3.25.2

Signed-off-by: Paul Harris<EMAIL_ADDRESS>Documentation

[X] I thought about documentation and added the documentation label to this PR if updates are required.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Custom themes support / tutorial

Is your feature request related to a problem? Please describe.
I would like to update the look and feel (theme) of a published dendron project.
Describe the solution you'd like
Some sort of simple custom theming support; fonts, colours, logos etc.
Describe alternatives you've considered
I can see that it would be possible to update from reading: https://dendron.so/notes/4c0ef322-3006-405c-9a66-3134dd9649a5.html
But its not very clear what the best what to update a theme would be, I think this could be just an article rather than any new feature.

Thanks for the request. We'll be adding more docs (and features) around theming. Have you published using Dendron already? Just an update that jekyll based publishing is now deprecated and we're now on 11ty. Dendron also has a managed publishing option which is documented here

Hi @kevinslin
I published some time back - I am sure it was still jekyll when I did that.
Is there any resource for hooking into the publishing flow with 11ty?
Thanks!

Hey Dennis,
So the nice thing with 11ty is that is should be a transparent migration
from jekyll based publishing. You can find the migration docs here:
https://dendron.so/notes/fd26b3ef-7978-41c9-8f45-4c4f8414951d.html
On Mon, Feb 22, 2021 at 1:03 AM Dennis<EMAIL_ADDRESS>wrote:

Hi @kevinslin https://github.com/kevinslin
I published some time back - I am sure it was still jekyll when I did that.
Is there any resource for hooking into the publishing flow with 11ty?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dendronhq/dendron/issues/496#issuecomment-783214869,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADD52LIQVQXUUQJOQJTMNTTAIMW7ANCNFSM4X5Y3HJA
.

Ok thanks, I will leave this open for theming support?

Yes, keep this open. We'll be working on theming in March

Where do things stand with custom themes at the moment? Is it still planned but at least a few months away?

As an update to this issue: We have since migrated to Next.js when it comes to publishing, so 11ty items can be disregarded.
Some related discussion items from the Dendron community related to this GitHub issue:

Discord Comment
we don't have docs on customizing the styling right now. the base style is ant.design. you can create a custom theme by following instructions here: https://ant.design/docs/react/customize-theme
you can then stick this in your custom header

Discord Comment
you can use this package to generate css for ant -> https://www.npmjs.com/package/@emeks/antd-custom-theme-generator

Discord Comment
Hey folks, if I ported al the scss stuff to less (such that it's compat with ant.design) would that be worthwhile? This will hopefully make it easier to implement custom theming later. My current custom them depends on modifying main.scss
Here's that write-up https://amar.io/memo/notes/lr2RxTLuy85mXFFN24lQ8/ though I'm still in the process of figuring things out!

Related: https://github.com/dendronhq/dendron/discussions/1298


Move non-nested classes and interfaces to their own files

Ensure all the C# files have copyright notices

Finally 😀

:shipit:

If there's any interest in #60, then these kinds of changes make it hard to maintain it on top of dev.

@Tragetaschen I would close 60 TBH, there are too many changes. It would be great it you worked with @halter73 to integrate what you think make sense in a more piece meal manner.

Yeah, I figured this would happen a long time ago. cherry-pick ftw
It's great to see Kestrel finally gets some attention!


Installation Issue

Hi, I am trying to install it on my server... but I got some error.
root@scw-happy-euler:~# mkdir -p /usr/src/app
root@scw-happy-euler:~# docker build -t youtube-scrape .
Sending build context to Docker daemon  22.53kB
Step 1/7 : FROM node:14.15.0
---> b90fa0d7cbd1
Step 2/7 : WORKDIR /usr/src/app
---> Using cache
---> 4a2e4719e626
Step 3/7 : COPY package*.json ./
COPY failed: no source files were specified
root@scw-happy-euler:~# Step 3/7 : COPY package*.json ./
Please help me.

Have you tried with ===>  https://www.npmjs.com/package/scrape-youtube

I don't use docker, but the docker build works fine when I just installed docker on windows. Maybe see if @ocinbat who added the support knows anything.

Hi @apurbapathak , you need to run docker build command at project root directory.

Thanks for your help guys.


Add pipeline task yaml for Bedrock test results

As a developer I would like analytics and metrics of my golang tests for bedrock environments that provide insight to reoccurring failures and test exceptions for my team to better improve the test harness.
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=yaml

Closing, Dup of -https://github.com/microsoft/bedrock/issues/867


Saving textblock with CompositionShadow on Canvas control to file does not save its shadow

I am trying to save a Textblock with shadow created using CompositionShadow control. The Textblock is a children of a Canvas control
<Grid Background="Transparent">
        <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Canvas x:Name="canvas">
            <controls:CompositionShadow BlurRadius="5" ShadowOpacity=".7" OffsetX="5" OffsetY="5"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center">
                <TextBlock TextWrapping="Wrap" FontSize="48" FontWeight="Bold">
                        Lorem ipsum dolor sit amet.
                </TextBlock>
            </controls:CompositionShadow>

        </Canvas>
        <Button x:Name="btnSave" Content="Save" Click="btnSave_Click" Grid.Row="1" />
    </Grid>
</Grid>

In my code behind I have
 private async void saveTextToFile(StorageFile file)
        {
            RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap();
            await renderTargetBitmap.RenderAsync(this.canvas);
            IBuffer pixelBuffer = await renderTargetBitmap.GetPixelsAsync();

            var width = renderTargetBitmap.PixelWidth;
            var height = renderTargetBitmap.PixelHeight;

            using (IRandomAccessStream stream = await file.OpenAsync(FileAccessMode.ReadWrite))
            {
                var encoder = await
                BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, stream);
                var displayInformation = DisplayInformation.GetForCurrentView();

                byte[] pixels = pixelBuffer.ToArray();
                encoder.SetPixelData(BitmapPixelFormat.Bgra8,
                                     BitmapAlphaMode.Premultiplied,
                                     (uint)width, (uint)height,
                                     displayInformation.RawDpiX,
                                     displayInformation.RawDpiY,
                                     pixels);

                await encoder.FlushAsync();
            }
        }

However as you can see below the shadow is not saved. So how do I make sure the shadow of the Textblock is also saved?

Unfortunately, RenderTargetBitmap does not capture the Composition shadow or any Composition visuals manually inserted below the XAML element.
I'm not aware of an easy way to perform the capture that you're looking for. If using pre-baked assets is an option (just having an image in your project of the text with the appropriate shadow), that would be my recommendation at the moment.

Can't you have a backdropbrush, and than use that in a win2d canvas, which you can save as a file? I think that could work.

You can't texture from Composition surfaces.

:( I guess that's a new feature request then. If I remember correctly this is not the first time people wanted to save composition content. (I wanted a faster rendertargetbitmap anyway.)

Good news. This issue was addressed in the Creator's Update 15063 - which is the current available version. As of that release earlier this year (2017) all composition content including shadows should be useable by RTB. Let us know if there is any issue with this.


Enable use of the Docker provider in Vagrant for testing local servers

The solo-server configuration should be replaced with a top-level Vagrant file that uses the Docker provider to host our image (e.g., "coderdojotc/python-minecraft-student" on the Docker Hub).
This will enable students and developers to stand up an environment in much less time, with much less data downloaded, and with fewer moving parts.

Very nice!
When I tried to stand up a new solo instance, I quickly found out that I didn't have docker installed. (Which lead me down the path of a complete reinstall of Ubuntu, since I was running an ancient Lucid!  :)
So, you may want to update the install steps to include installing docker:  https://docs.docker.com/installation/#installation
After getting everything installed, it started up just fine.  Also - I'm guessing that I really didn't need virtualbox since the change to docker and the fact that I'm using Linux.
It would also be nice to have a few hints on how to connect to the minecraft server console in this new environment (I'm trying to figure that out right now).


How to download sources of dependencies?

Hello,
how to download sources of dependencies (even transitive?)
with best regards, jiri

Hi, this is most likely a Gradle question.
I think you might be able to do it by specifying a qualifier in the dependency declaration.
See https://stackoverflow.com/questions/28404149/how-to-download-javadocs-and-sources-for-jar-using-gradle-2-0
Example:
compile "commons-codec:commons-codec:1.10:sources"

?? what does it mean? Must I specify for each dependency new line with dependency which ends:sources?
No, it could be true??


Allow variable creation with different target environments

closes https://github.com/rilldata/rill/issues/6150
https://www.notion.so/rilldata/Environment-Variables-management-UI-42304f145b07410d86c2a523496aa6bc

[x] allow 1 unique variable key + environment
[x] disallow updating existing variable in create dialog perhaps

https://github.com/user-attachments/assets/3769feac-b5d4-43b4-9046-95b8b6a9c049

It should probably be a server-side check, but it shouldn't be possible to have multiple test keys for a given environment. If test[dev,prod]=abc and test[prod]=def, what is the value of test in production? I see that Vercel prevents such a submission:

It should probably be a server-side check, but it shouldn't be possible to have multiple test keys for a given environment. If test[dev,prod]=abc and test[prod]=def, what is the value of test in production? I see that Vercel prevents such a submission:

Agreed - This should ideally be a server-side check.

It should probably be a server-side check, but it shouldn't be possible to have multiple test keys for a given environment

This already is not possible at the DB level, so you may have a UI state issue if that seems to be the case. If you see this, can you try refreshing the page?
Also note that the UpdateProjectVariables API is an update API, so it's not going to give you errors like the one Vercel returns – if test[dev,prod]=abc and you update test[prod]=def, then the new state is test[dev]=abc and test[prod]=def.

It sounds like it may be helpful with some context about how variables are stored in the database. This is the schema:
CREATE TABLE project_variables (
  id UUID NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY,
  project_id UUID NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
  name TEXT NOT NULL,
  value TEXT NOT NULL,
  -- Encryption key ID if the value is encrypted
  value_encryption_key_id TEXT NOT NULL DEFAULT '',
  -- Environment it belongs to ("prod" or "dev").
  -- If empty, then it should be used as the fallback for all environments.
  environment TEXT NOT NULL DEFAULT '',
  -- The user who most recently edited the variable
  updated_by_user_id UUID REFERENCES users(id) ON DELETE SET NULL,
  created_on TIMESTAMPTZ DEFAULT now() NOT NULL,
  updated_on TIMESTAMPTZ DEFAULT now() NOT NULL
);

CREATE UNIQUE INDEX project_variables_project_id_environment_name_idx ON project_variables (project_id, environment, lower(name));

Note that there's a unique index on project_id, environment, lower(name). This unique index is used to determine if a variable should be added or updated in calls to UpdateProjectVariables in the following upsert statement:
INSERT INTO project_variables (project_id, environment, name, value, value_encryption_key_id, updated_by_user_id, updated_on)
VALUES ...
ON CONFLICT (project_id, environment, lower(name)) DO UPDATE SET
  value = EXCLUDED.value,
  value_encryption_key_id = EXCLUDED.value_encryption_key_id,
  updated_by_user_id = EXCLUDED.updated_by_user_id,
  updated_on = now()
RETURNING *

Latest demo:
https://github.com/user-attachments/assets/ebf9c668-cf16-4289-9bf9-e60858e5cd25

It should probably be a server-side check, but it shouldn't be possible to have multiple test keys for a given environment

This already is not possible at the DB level, so you may have a UI state issue if that seems to be the case. If you see this, can you try refreshing the page?
Also note that the UpdateProjectVariables API is an update API, so it's not going to give you errors like the one Vercel returns – if test[dev,prod]=abc and you update test[prod]=def, then the new state is test[dev]=abc and test[prod]=def.
It sounds like it may be helpful with some context about how variables are stored in the database. This is the schema:
CREATE TABLE project_variables (
  id UUID NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY,
  project_id UUID NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
  name TEXT NOT NULL,
  value TEXT NOT NULL,
  -- Encryption key ID if the value is encrypted
  value_encryption_key_id TEXT NOT NULL DEFAULT '',
  -- Environment it belongs to ("prod" or "dev").
  -- If empty, then the value is used as the fallback for all environments.
  environment TEXT NOT NULL DEFAULT '',
  -- The user who most recently edited the variable
  updated_by_user_id UUID REFERENCES users(id) ON DELETE SET NULL,
  created_on TIMESTAMPTZ DEFAULT now() NOT NULL,
  updated_on TIMESTAMPTZ DEFAULT now() NOT NULL
);

CREATE UNIQUE INDEX project_variables_project_id_environment_name_idx ON project_variables (project_id, environment, lower(name));

Note that there's a unique index on project_id, environment, lower(name). This unique index is used to determine if a variable should be added or updated in calls to UpdateProjectVariables in the following upsert statement:
INSERT INTO project_variables (project_id, environment, name, value, value_encryption_key_id, updated_by_user_id, updated_on)
VALUES ...
ON CONFLICT (project_id, environment, lower(name)) DO UPDATE SET
  value = EXCLUDED.value,
  value_encryption_key_id = EXCLUDED.value_encryption_key_id,
  updated_by_user_id = EXCLUDED.updated_by_user_id,
  updated_on = now()
RETURNING *

When resolving variables for the runtime, it first builds a list of all variables with environment = '' (the fallback values for all environments), and then overwrites it with all variables with environment = '<target env>' (the override values for the specific environment).

Added more checks on the client side to check for duplicates before hitting the actual Update API operation call.


Sending email from the server

Hi,
I have been using this container for a few weeks now. It is working fine. I, however, have a question. How can my server keep sending email, like reports?
On my other servers, I have sendmail running, for example, in order to send "system mails". However, since I have the container running on the same port, I had to disable sendmail...
Any idea how to fix this?
Thanks.
EDIT : I guess, I could change "outiside" port numbers on the Docker container, but I am lookng for some nicer solution than changing official service ports...

Hi @Nesousx, thanks for using this image.
Regarding your point, /etc/aliases to set email address and installing package like ssmtp should do the trick.
Let me know.

Close due to inactivity, reopen if needed.


Suggestion: Infer tuple type for literal arrays passed to generic functions

Code
declare function trivialExample<T extends any[], K extends keyof T>(arr: T, index: K): T[K]

const numVal = trivialExample([1, "test"], "0") // numVal would have type number
const strVal = trivialExample([1, "test"], "1") // strVal would have type string

Current behavior:
Compile error because typescript infers a regular array and doesn't know that "0" is a keyof T.
Desired behavior:
Typescript would infer a tuple type for T and compile without errors.
Reason
Since the addition of conditional types I've come across a couple real situations where I've wanted it to work like this. Conditional types make it easy to filter out the uninteresting keys that exist on all arrays so you can just work with the indices. A simplified example of something I've actually tried to do is the following code which declares a function that takes an array of any number of objects and returns a single combined object, and would have a compile time error if you accidentally pass it the same property twice:
type ArrayKeys = keyof any[]
type Indices<T> = Exclude<keyof T, ArrayKeys>
type GetUnionKeys<U> = U extends Record<infer K, any> ? K : never
type CombineUnion<U> = { [K in GetUnionKeys<U>]: U extends Record<K, infer T> ? T : never }
type Combine<T> = CombineUnion<T[Indices<T>]>

declare function combine<
  T extends object[] &
    {
      [K in Indices<T>]: {
        [K2 in keyof T[K]]: K2 extends GetUnionKeys<T[Exclude<Indices<T>, K>]> ? never : any
      }
    }
>(objectsToCombine: T): Combine<T>

const result1 = combine([{ foo: 534 }, { bar: "test" }])
// result1 would have type {foo: number, bar: string}

const error1 = combine([{ foo: 534, dupKey: "dup1" }, { bar: "test", dupKey: "dup2" }])
// Want a compile error here because user unexpectedly listed dupKey twice.

Hacky Workaround
By digging around in the typescript codebase I figured out that you can actually trick the compiler into making this work already. The trick is to add an intersection with { "0": any }
declare function combine2<
  T extends object[] &
    {
      [K in Indices<T>]: {
        [K2 in keyof T[K]]: K2 extends GetUnionKeys<T[Exclude<Indices<T>, K>]> ? never : any
      }
    } & { "0": any }
>(objectsToCombine: T): Combine<T>

const result2 = combine2([{ foo: 534 }, { bar: "test" }])
// in TS 2.8 result2 has type {foo: number, bar: string}

const error2 = combine2([{ foo: 534, dupKey: "dup1" }, { bar: "test", dupKey: "dup2" }])
// Actually has an error here as intended because of dupKey in both objects

The checker.ts file is too long for Github to let me link to the line but the reason it works is because checkArrayLiteral calls contextualTypeIsTupleLikeType to decide if it should make the type a tuple or an array, and that ends up deciding it is a tuple type if the contextual type has a property named "0". That seems like an implementation detail that might stop working at any point though so I don't feel like it's something we could safely use in real projects.
Drawbacks
The big drawback I can see is that this would result in a non-intuitive difference in behavior between
const works = combine([{ foo: 534 }, { bar: "test" }])

const arrayVar = [{ foo: 534 }, { bar: "test" }]
const wouldNotWork = combine(arrayVar)

Typescript already has the "no excess properties on literal objects" case where it behaves differently based on passing a literal or a variable, but admittedly the reason for the difference in that case is pretty intuitive and actually helps the user while in this case the difference in behavior would be much harder to explain.
Related Issues:
#16656 is similar but is about the more general behavior of literal arrays like ["foo", 12] being given the type (string | number)[] instead of [string, number]. This issue is just about the specific case of passing literal arrays directly to a function.
Search Terms:
tuple, literal array, generic function, type inference, keyof array

Actually thinking about it #16656 is just asking for a way to get tuple types without manually annotating everything, so this would basically fix that too via a function like:
function tuple<T extends any[]>(array: T): T { return array }
const myTuple = tuple(["str", 10]) // myTuple would have type [string, number]

The downside is that meaningless function call would actually exist at runtime but that seems pretty inconsequential.

The proposal here would have us giving a completely wrong type to arr:
// Free version of Array#filter
declare function filter<T extends any[]>(arr: T[], cond: (arg: T) => {})

// Inferred type [number, number, string]
// Actual type [number, string]
const arr = filter([0, 1, ""], s => !!s);

Your example isn't what I'm proposing. What I'm proposing would be more like
type ArrayKeys = keyof any[]
type Indices<T> = Exclude<keyof T, ArrayKeys>

// notice how arr declared to have type T instead of T[]
declare function filter<T extends any[], U extends T[Indices<T>]>(arr: T, cond: (value: U ) => {}): U[];

const filtered = filter([0, "x", 0], s => !!s);

but it wouldn't add any value(but also wouldn't hurt anything as far as I can tell) in that example so it'd be simpler to keep the definition something like
declare function filter<T>(arr: T[], cond: (value: T) => {}): T[];

Which I'm not proposing to change at all.

What would be the type of numVal in your proposal?
declare function trivialExample<T extends any[]>(arr: T): T;
const numVal = trivialExample([1, "test"]);

In that example the type would be [number, string]

That'd be a substantial breaking change; not something we can really do. There are plenty of functions declared like this
declare function reverse<T extends any[]>(arr: T): T;
const numVal = reverse([1, "test"]);

and we can't just say "Well you should have written the declaration differently because now it means something completely different".

Yeah, I have seen the many discussions of the problems going from arrays to tuple and knew you don't want to generally infer tuples everywhere. I was mainly thinking about cases where you weren't going to return the array from the function and figured it wouldn't be a breaking change in those cases, and I only thought about the implications of actually returning the inferred type afterwards.
I can see that it'd be a breaking change, but for the sake of argument is there any real difference today in writing
declare function reverse<T extends any[]>(arr: T): T;

instead of
declare function reverse<T>(arr: T[]): T[];

meaning that if you hypothetically made this breaking change, would there be any cases where people who need the old behavior couldn't just write it as the T[] form? I could easily be missing something but I can't think of a case where that would cause a problem.
Just my opinion but I think there would be such a large amount of value from providing a way to infer tuple types that it might be worth a breaking change, assuming I'm right that just converting to T[] would be a workaround for anyone affected.


[Fonts] Update icons

This PR adds 1028 new icons.
Starting with this update and going forward, existing codepoints will be stable between updates. This has the nice side effect of making diffs readable. There is one exception for this particular update for wifi_tethering_error_rounded_sharp and wifi_tethering_error_rounded_outlined.
Closes #88852
Closes #91553

Closes #95238

As per previous icon updates, Google testing check is expected to fail and can be safely ignored.

I'm curious about Adobe that was added but isn't on the official website and Facebook that got removed from Google Fonts.

Please tell me how to use it.


Create forget password validation in sign up page.

Feature addition to sign up page.
Add forget password validation which will be very useful

@pravleen17 do you want to work on ..?

I want to work on this issue !!

I would like to work on this.
Please do assign this to me.

I would like to work on this.
Please do assign this to me.

Already assigned.

Okay
On Mon, 12 Jul 2021, 2:13 pm Qazi Maaz Arshad, @.***>
wrote:

I would like to work on this.
Please do assign this to me.
Already assigned.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/QAZIMAAZARSHAD/Apni-Dukaan/issues/67#issuecomment-878090101,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARMXVKREY7EPYTSQ6MS6SWLTXKTKRANCNFSM5AFEXQWA
.


Rename modifiers

Come up with a better name for modifiers... they represent anything that can happen at the cell level, more than just formatting (variables, fills, validations)

CellOptions? CellConfig?

Or maybe just move them directly onto Cell and Row?  Still need to settle on better terminology for things like BorderSide, TextFormat, etc

I'm leaning towards just putting these directly onto the Cell and Row


When will opengauss or gaussdb be supported?

Search before asking

[X] I searched in the issues and found nothing similar.

Motivation
Opengauss and Huawei Cloud's gaussdb have been widely used in the financial industry in mainland China, and I hope that flink-cdc-connectors will have plans to support opengauss and gaussdb.
Solution
I see a two year old case here, not sure if it can work. Reference: https://github.com/dafei1288/flink-connector-opengauss
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?

[ ] I'm willing to submit a PR!

Closing this issue as it has been migrated to Apache Jira.


CocoaPods + Xcode 8 error

Got an error when trying to install SwiftLocation:
Podfile
pod 'SwiftLocation', '>= 1.1.0'

Error
[!] /usr/local/bin/git clone https://github.com/malcommac/SwiftLocation.git /var/folders/4b/dcgjrm3n3_3gh45gk237vx5c0000gn/T/d20160914-28528-1fe4wov --template= --single-branch --depth 1 --branch 1.1.0
Cloning into '/var/folders/4b/dcgjrm3n3_3gh45gk237vx5c0000gn/T/d20160914-28528-1fe4wov'...
warning: Could not find remote branch 1.1.0 to clone.
fatal: Remote branch 1.1.0 not found in upstream origin

Let's try again and tell me if it works plz :)

It works now. Thanks! 😄


mkdir: add function to onyo, update tests

I have opened #65. Please check to see if this PR and mine match in how they expect mkdir to work. If you notice any discrepancies, please let me know. :-)

When passing a list: Before creating the first folder, it is now checked, if one of them will throw an error.
Now the readme and the implementation fit together.


Fix mysql/maria sample to have a sampleapp and data

This should fix issue:
https://github.com/openshift/oadp-operator/issues/609
This adds a mediawiki app that uses mariadb and has
data associated with it.

/hold I found a bug on line 178.. I need to dynamically get the route address in the template. Looking this up

I love your dynamic on this issue.

/retest

/retest

/unhold

/retest

/retest

/retest

/retest

/retest  once more for consistency

/test 4.8-operator-e2e

/test 4.9-operator-e2e

ok.. think we're gtg https://prow.ci.openshift.org/pr-history/?org=openshift&repo=oadp-operator&pr=612  on https://github.com/openshift/oadp-operator/pull/612 w/ two follow up items.    https://github.com/openshift/oadp-operator/issues/619 and https://github.com/openshift/oadp-operator/issues/622