Merge branch 'master' into users/languye/improve-filter-view

This commit is contained in:
Laurent Nguyen
2024-05-15 14:28:22 +02:00
13 changed files with 62 additions and 5 deletions

View File

@@ -336,3 +336,10 @@
height: 0; height: 0;
border-color: @InfoPointerColor transparent; border-color: @InfoPointerColor transparent;
} }
/*********************************************************************************************************
Screen Reader Only
**********************************************************************************************************/
.screenReaderOnly {
position: absolute;
left: -9999px;
}

View File

@@ -382,6 +382,7 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
)} )}
{!this.state.createNewDatabase && ( {!this.state.createNewDatabase && (
<Dropdown <Dropdown
ariaLabel="Choose an existing database"
styles={{ title: { height: 27, lineHeight: 27 }, dropdownItem: { fontSize: 12 } }} styles={{ title: { height: 27, lineHeight: 27 }, dropdownItem: { fontSize: 12 } }}
style={{ width: 300, fontSize: 12 }} style={{ width: 300, fontSize: 12 }}
placeholder="Choose an existing database" placeholder="Choose an existing database"
@@ -924,10 +925,9 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
} }
/> />
<Text variant="small"> <Text variant="small">
<Icon iconName="InfoSolid" className="removeIcon" tabIndex={0} /> To ensure compatibility with <Icon iconName="InfoSolid" className="removeIcon" /> To ensure compatibility with older SDKs, the
older SDKs, the created container will use a legacy partitioning scheme that supports partition created container will use a legacy partitioning scheme that supports partition key values of size
key values of size only up to 101 bytes. If this is enabled, you will not be able to use only up to 101 bytes. If this is enabled, you will not be able to use hierarchical partition keys.{" "}
hierarchical partition keys.{" "}
<Link href="https://aka.ms/cosmos-large-pk" target="_blank"> <Link href="https://aka.ms/cosmos-large-pk" target="_blank">
Learn more Learn more
</Link> </Link>

View File

@@ -2140,6 +2140,11 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
</div> </div>
</PanelFooterComponent> </PanelFooterComponent>
</form> </form>
<span
className="screenReaderOnly"
id="screenReaderStatus"
role="status"
/>
</RightPaneForm> </RightPaneForm>
</DeleteCollectionConfirmationPane> </DeleteCollectionConfirmationPane>
`; `;

View File

@@ -7073,6 +7073,11 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
</div> </div>
</PanelFooterComponent> </PanelFooterComponent>
</form> </form>
<span
className="screenReaderOnly"
id="screenReaderStatus"
role="status"
/>
</RightPaneForm> </RightPaneForm>
</ExecuteSprocParamsPane> </ExecuteSprocParamsPane>
`; `;

View File

@@ -2,6 +2,7 @@ import React, { CSSProperties, FunctionComponent, ReactNode } from "react";
import { PanelFooterComponent } from "../PanelFooterComponent"; import { PanelFooterComponent } from "../PanelFooterComponent";
import { PanelInfoErrorComponent } from "../PanelInfoErrorComponent"; import { PanelInfoErrorComponent } from "../PanelInfoErrorComponent";
import { PanelLoadingScreen } from "../PanelLoadingScreen"; import { PanelLoadingScreen } from "../PanelLoadingScreen";
import { labelToLoadingItemName } from "Explorer/Tables/Constants";
export interface RightPaneFormProps { export interface RightPaneFormProps {
formError: string; formError: string;
@@ -27,6 +28,10 @@ export const RightPaneForm: FunctionComponent<RightPaneFormProps> = ({
const handleOnSubmit = (event: React.FormEvent<HTMLFormElement>) => { const handleOnSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault(); event.preventDefault();
onSubmit(); onSubmit();
const screenReaderStatusElement = document.getElementById("screenReaderStatus");
if (screenReaderStatusElement) {
screenReaderStatusElement.innerHTML = labelToLoadingItemName[submitButtonText] || "Loading";
}
}; };
return ( return (
@@ -42,6 +47,7 @@ export const RightPaneForm: FunctionComponent<RightPaneFormProps> = ({
/> />
)} )}
</form> </form>
<span role="status" className="screenReaderOnly" id="screenReaderStatus"></span>
{isExecuting && <PanelLoadingScreen />} {isExecuting && <PanelLoadingScreen />}
</> </>
); );

View File

@@ -1782,5 +1782,10 @@ exports[`Right Pane Form should render Default properly 1`] = `
</div> </div>
</PanelFooterComponent> </PanelFooterComponent>
</form> </form>
<span
className="screenReaderOnly"
id="screenReaderStatus"
role="status"
/>
</RightPaneForm> </RightPaneForm>
`; `;

View File

@@ -2449,6 +2449,11 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
</div> </div>
</PanelFooterComponent> </PanelFooterComponent>
</form> </form>
<span
className="screenReaderOnly"
id="screenReaderStatus"
role="status"
/>
</RightPaneForm> </RightPaneForm>
</StringInputPane> </StringInputPane>
`; `;

View File

@@ -3019,6 +3019,11 @@ exports[`Table query select Panel should render Default properly 1`] = `
</div> </div>
</PanelFooterComponent> </PanelFooterComponent>
</form> </form>
<span
className="screenReaderOnly"
id="screenReaderStatus"
role="status"
/>
</RightPaneForm> </RightPaneForm>
</TableQuerySelectPanel> </TableQuerySelectPanel>
`; `;

View File

@@ -2130,6 +2130,11 @@ exports[`Excute Add Table Entity Pane should render Default properly 1`] = `
</div> </div>
</PanelFooterComponent> </PanelFooterComponent>
</form> </form>
<span
className="screenReaderOnly"
id="screenReaderStatus"
role="status"
/>
</RightPaneForm> </RightPaneForm>
</AddTableEntityPanel> </AddTableEntityPanel>
`; `;

View File

@@ -2136,6 +2136,11 @@ exports[`Excute Edit Table Entity Pane should render Default properly 1`] = `
</div> </div>
</PanelFooterComponent> </PanelFooterComponent>
</form> </form>
<span
className="screenReaderOnly"
id="screenReaderStatus"
role="status"
/>
</RightPaneForm> </RightPaneForm>
</EditTableEntityPanel> </EditTableEntityPanel>
`; `;

View File

@@ -466,7 +466,6 @@ exports[`AddCollectionPanel should render Default properly 1`] = `
<Icon <Icon
className="removeIcon" className="removeIcon"
iconName="InfoSolid" iconName="InfoSolid"
tabIndex={0}
/> />
To ensure compatibility with older SDKs, the created container will use a legacy partitioning scheme that supports partition key values of size only up to 101 bytes. If this is enabled, you will not be able to use hierarchical partition keys. To ensure compatibility with older SDKs, the created container will use a legacy partitioning scheme that supports partition key values of size only up to 101 bytes. If this is enabled, you will not be able to use hierarchical partition keys.

View File

@@ -2810,6 +2810,11 @@ exports[`Delete Database Confirmation Pane Should call delete database 1`] = `
</div> </div>
</PanelFooterComponent> </PanelFooterComponent>
</form> </form>
<span
className="screenReaderOnly"
id="screenReaderStatus"
role="status"
/>
</RightPaneForm> </RightPaneForm>
</DeleteDatabaseConfirmationPanel> </DeleteDatabaseConfirmationPanel>
`; `;

View File

@@ -225,3 +225,8 @@ export const InputType = {
DateTime: "datetime-local", DateTime: "datetime-local",
Number: "number", Number: "number",
}; };
export const labelToLoadingItemName: Record<string, string> = {
"Add Row": "Adding row to table",
"Add Entity": "Adding entity to table",
};