Compare commits

...

23 Commits

Author SHA1 Message Date
MokireddySampath
902199d9ce Update tsconfig.strict.json 2023-08-02 16:54:11 +05:30
MokireddySampath
fa0a508973 Update tsconfig.strict.json 2023-08-02 16:44:28 +05:30
MokireddySampath
985aa2e9ac Update tsconfig.strict.json 2023-08-02 16:29:18 +05:30
MokireddySampath
2283aa8d94 Update TableEntity.tsx 2023-07-04 09:22:03 +05:30
MokireddySampath
32373a0ead Update TableEntity.tsx 2023-07-04 09:16:57 +05:30
MokireddySampath
36777b5a16 Update TableEntity.tsx 2023-06-27 20:30:52 +05:30
MokireddySampath
1d481d1740 Update TableEntity.tsx 2023-06-26 16:48:23 +05:30
MokireddySampath
f87cdac062 Update TableEntity.tsx 2023-06-26 16:47:16 +05:30
MokireddySampath
dc16ff2dfc Update QueryTablesTab.html 2023-06-08 18:53:05 +05:30
MokireddySampath
9edb5a6bb5 Update DataTableBindingManager.ts 2023-06-08 18:52:00 +05:30
MokireddySampath
0fcb2f9669 Update DataTableBindingManager.ts 2023-06-08 18:50:50 +05:30
MokireddySampath
fdfdc4a3de Update AddCollectionPanel.test.tsx.snap 2023-06-08 15:16:36 +05:30
MokireddySampath
39c55c1607 Update PanelComponent.less 2023-06-08 15:14:57 +05:30
MokireddySampath
db2caf9a81 Update AddCollectionPanel.tsx 2023-06-08 15:14:23 +05:30
MokireddySampath
c858c1042d Update AddCollectionPanel.tsx 2023-06-08 15:11:48 +05:30
MokireddySampath
e243d87310 Update ThroughputInput.less 2023-06-08 15:09:46 +05:30
MokireddySampath
e0123656d7 Update ThroughputInputAutoPilotV3Component.test.tsx.snap 2023-06-08 15:09:24 +05:30
MokireddySampath
6068194d26 Update ThroughputInputAutoPilotV3Component.tsx 2023-06-07 20:30:18 +05:30
MokireddySampath
c6ef6ba02d Update TableEntity.tsx 2023-06-07 20:27:04 +05:30
MokireddySampath
9095e39f94 Update queryBuilder.less 2023-06-07 20:24:38 +05:30
Sampath
437a9835f8 aria labels added to add table row dialog elements appropriately 2023-06-07 20:23:17 +05:30
Sampath
75176550f0 role and alt text has been added to presentation images 2023-06-07 01:23:09 +05:30
Sampath
bbf89eaed8 aria label has been changed for the screen readers to read placeholder text along with label text 2023-06-07 00:50:37 +05:30
11 changed files with 22 additions and 66 deletions

View File

@@ -230,7 +230,7 @@ input::-webkit-inner-spin-button {
.advanced-options-panel .advanced-options .select .select-options-link { .advanced-options-panel .advanced-options .select .select-options-link {
margin-left: 4px; margin-left: 4px;
cursor: pointer; cursor: pointer;
padding: 2px; outline: none;
} }
.query-panel .row .column-headers .Field { .query-panel .row .column-headers .Field {

View File

@@ -1,5 +1,6 @@
import { DatePicker, TextField } from "@fluentui/react"; import { DatePicker, TextField } from "@fluentui/react";
import React, { FunctionComponent } from "react"; import React, { FunctionComponent } from "react";
import { attributeValueLabel } from "../Explorer/Panes/Tables/Validators/EntityTableHelper";
export interface TableEntityProps { export interface TableEntityProps {
entityValueLabel?: string; entityValueLabel?: string;
@@ -55,11 +56,13 @@ export const EntityValue: FunctionComponent<TableEntityProps> = ({
label={entityValueLabel && entityValueLabel} label={entityValueLabel && entityValueLabel}
className="addEntityTextField" className="addEntityTextField"
id="entityValueId" id="entityValueId"
autoFocus
disabled={isEntityValueDisable} disabled={isEntityValueDisable}
type={entityValueType} type={entityValueType}
placeholder={entityValuePlaceholder} placeholder={entityValuePlaceholder}
value={typeof entityValue === "string" ? entityValue : ""} value={typeof entityValue === "string" ? entityValue : ""}
onChange={onEntityValueChange} onChange={onEntityValueChange}
ariaLabel={attributeValueLabel}
/> />
); );
}; };

View File

@@ -12,6 +12,7 @@ import {
import React, { FunctionComponent } from "react"; import React, { FunctionComponent } from "react";
import DeleteIcon from "../../images/delete.svg"; import DeleteIcon from "../../images/delete.svg";
import EditIcon from "../../images/Edit_entity.svg"; import EditIcon from "../../images/Edit_entity.svg";
import { attributeNameLabel, dataTypeLabel } from "../Explorer/Panes/Tables/Validators/EntityTableHelper";
import { CassandraType, TableType } from "../Explorer/Tables/Constants"; import { CassandraType, TableType } from "../Explorer/Tables/Constants";
import { userContext } from "../UserContext"; import { userContext } from "../UserContext";
import { EntityValue } from "./EntityValue"; import { EntityValue } from "./EntityValue";
@@ -36,7 +37,7 @@ export interface TableEntityProps {
onDeleteEntity?: () => void; onDeleteEntity?: () => void;
onEditEntity?: () => void; onEditEntity?: () => void;
onEntityPropertyChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void; onEntityPropertyChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
onEntityTypeChange: (event: React.FormEvent<HTMLElement>, selectedParam: IDropdownOption) => void; onEntityTypeChange: (event: React.FormEvent<HTMLElement>, selectedParam: IDropdownOption) => void
onEntityValueChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void; onEntityValueChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
onSelectDate: (date: Date | null | undefined) => void; onSelectDate: (date: Date | null | undefined) => void;
onEntityTimeValueChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void; onEntityTimeValueChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
@@ -113,6 +114,7 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
value={entityProperty} value={entityProperty}
onChange={onEntityPropertyChange} onChange={onEntityPropertyChange}
required required
ariaLabel={attributeNameLabel}
/> />
<Dropdown <Dropdown
label={entityTypeLabel && entityTypeLabel} label={entityTypeLabel && entityTypeLabel}
@@ -122,6 +124,7 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
disabled={isPropertyTypeDisable} disabled={isPropertyTypeDisable}
id="entityTypeId" id="entityTypeId"
styles={dropdownStyles} styles={dropdownStyles}
ariaLabel={dataTypeLabel}
/> />
<EntityValue <EntityValue
entityValueLabel={entityValueLabel} entityValueLabel={entityValueLabel}
@@ -137,7 +140,7 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
/> />
{!isEntityValueDisable && ( {!isEntityValueDisable && (
<TooltipHost content="Edit property" id="editTooltip"> <TooltipHost content="Edit property" id="editTooltip">
<div> <div tabIndex={0}>
<Image <Image
{...imageProps} {...imageProps}
src={EditIcon} src={EditIcon}

View File

@@ -24,8 +24,6 @@ import { calculateEstimateNumber, usageInGB } from "../../../../../Utils/Pricing
import { Int32 } from "../../../../Panes/Tables/Validators/EntityPropertyValidationCommon"; import { Int32 } from "../../../../Panes/Tables/Validators/EntityPropertyValidationCommon";
import { import {
AutoscaleEstimatedSpendingDisplayProps, AutoscaleEstimatedSpendingDisplayProps,
ManualEstimatedSpendingDisplayProps,
PriceBreakdown,
checkBoxAndInputStackProps, checkBoxAndInputStackProps,
getAutoPilotV3SpendElement, getAutoPilotV3SpendElement,
getChoiceGroupStyles, getChoiceGroupStyles,
@@ -33,14 +31,16 @@ import {
getRuPriceBreakdown, getRuPriceBreakdown,
getTextFieldStyles, getTextFieldStyles,
getToolTipContainer, getToolTipContainer,
ManualEstimatedSpendingDisplayProps,
manualToAutoscaleDisclaimerElement, manualToAutoscaleDisclaimerElement,
messageBarStyles, messageBarStyles,
noLeftPaddingCheckBoxStyle, noLeftPaddingCheckBoxStyle,
PriceBreakdown,
saveThroughputWarningMessage, saveThroughputWarningMessage,
titleAndInputStackProps, titleAndInputStackProps,
transparentDetailsHeaderStyle, transparentDetailsHeaderStyle,
} from "../../SettingsRenderUtils"; } from "../../SettingsRenderUtils";
import { IsComponentDirtyResult, getSanitizedInputValue, isDirty } from "../../SettingsUtils"; import { getSanitizedInputValue, IsComponentDirtyResult, isDirty } from "../../SettingsUtils";
import { ToolTipLabelComponent } from "../ToolTipLabelComponent"; import { ToolTipLabelComponent } from "../ToolTipLabelComponent";
export interface ThroughputInputAutoPilotV3Props { export interface ThroughputInputAutoPilotV3Props {
@@ -218,7 +218,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
const estimatedSpendingColumns: IColumn[] = [ const estimatedSpendingColumns: IColumn[] = [
{ {
key: "costType", key: "costType",
name: "Cost Type", name: "",
fieldName: "costType", fieldName: "costType",
minWidth: 100, minWidth: 100,
maxWidth: 200, maxWidth: 200,
@@ -312,7 +312,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
const estimatedSpendingColumns: IColumn[] = [ const estimatedSpendingColumns: IColumn[] = [
{ {
key: "costType", key: "costType",
name: "Cost type", name: "",
fieldName: "costType", fieldName: "costType",
minWidth: 100, minWidth: 100,
maxWidth: 200, maxWidth: 200,

View File

@@ -311,7 +311,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
"key": "costType", "key": "costType",
"maxWidth": 200, "maxWidth": 200,
"minWidth": 100, "minWidth": 100,
"name": "Cost type", "name": "",
"styles": Object { "styles": Object {
"root": Object { "root": Object {
"selectors": Object { "selectors": Object {
@@ -586,7 +586,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
"key": "costType", "key": "costType",
"maxWidth": 200, "maxWidth": 200,
"minWidth": 100, "minWidth": 100,
"name": "Cost type", "name": "",
"styles": Object { "styles": Object {
"root": Object { "root": Object {
"selectors": Object { "selectors": Object {

View File

@@ -14,7 +14,3 @@
.throughputInputSpacing > :not(:last-child) { .throughputInputSpacing > :not(:last-child) {
margin-bottom: @DefaultSpace; margin-bottom: @DefaultSpace;
} }
.capacitycalculator-link:focus{
text-decoration: underline;
outline-offset: 2px;
}

View File

@@ -33,7 +33,6 @@ import { isCapabilityEnabled, isServerlessAccount } from "Utils/CapabilityUtils"
import { getUpsellMessage } from "Utils/PricingUtils"; import { getUpsellMessage } from "Utils/PricingUtils";
import { CollapsibleSectionComponent } from "../Controls/CollapsiblePanel/CollapsibleSectionComponent"; import { CollapsibleSectionComponent } from "../Controls/CollapsiblePanel/CollapsibleSectionComponent";
import { ThroughputInput } from "../Controls/ThroughputInput/ThroughputInput"; import { ThroughputInput } from "../Controls/ThroughputInput/ThroughputInput";
import "../Controls/ThroughputInput/ThroughputInput.less";
import { ContainerSampleGenerator } from "../DataSamples/ContainerSampleGenerator"; import { ContainerSampleGenerator } from "../DataSamples/ContainerSampleGenerator";
import Explorer from "../Explorer"; import Explorer from "../Explorer";
import { useDatabases } from "../useDatabases"; import { useDatabases } from "../useDatabases";
@@ -844,11 +843,7 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
<Text variant="small"> <Text variant="small">
Azure Synapse Link is required for creating an analytical store{" "} Azure Synapse Link is required for creating an analytical store{" "}
{getCollectionName().toLocaleLowerCase()}. Enable Synapse Link for this Cosmos DB account.{" "} {getCollectionName().toLocaleLowerCase()}. Enable Synapse Link for this Cosmos DB account.{" "}
<Link <Link href="https://aka.ms/cosmosdb-synapselink" target="_blank">
href="https://aka.ms/cosmosdb-synapselink"
target="_blank"
className="capacitycalculator-link"
>
Learn more Learn more
</Link> </Link>
</Text> </Text>

View File

@@ -112,9 +112,6 @@
margin-top: 28px; margin-top: 28px;
margin-left: 4px !important; margin-left: 4px !important;
} }
.addRemoveIcon [alt="editEntity"]:focus,.addRemoveIconLabel [alt="editEntity"]:focus{
border:1px dashed #605E5C
}
.addNewParamStyle { .addNewParamStyle {
margin-top: 5px; margin-top: 5px;
margin-left: 5px !important; margin-left: 5px !important;

View File

@@ -400,7 +400,6 @@ exports[`AddCollectionPanel should render Default properly 1`] = `
. Enable Synapse Link for this Cosmos DB account. . Enable Synapse Link for this Cosmos DB account.
<StyledLinkBase <StyledLinkBase
className="capacitycalculator-link"
href="https://aka.ms/cosmosdb-synapselink" href="https://aka.ms/cosmosdb-synapselink"
target="_blank" target="_blank"
> >

View File

@@ -1,14 +1,15 @@
import * as ko from "knockout"; import * as ko from "knockout";
import * as _ from "underscore"; import * as _ from "underscore";
import QueryTablesTab from "../../Tabs/QueryTablesTab";
import * as Constants from "../Constants"; import * as Constants from "../Constants";
import * as Entities from "../Entities"; import * as ViewModels from "../../../Contracts/ViewModels";
import * as Utilities from "../Utilities";
import * as DataTableBuilder from "./DataTableBuilder"; import * as DataTableBuilder from "./DataTableBuilder";
import DataTableOperationManager from "./DataTableOperationManager"; import DataTableOperationManager from "./DataTableOperationManager";
import * as DataTableOperations from "./DataTableOperations"; import * as DataTableOperations from "./DataTableOperations";
import QueryTablesTab from "../../Tabs/QueryTablesTab";
import TableEntityListViewModel from "./TableEntityListViewModel"; import TableEntityListViewModel from "./TableEntityListViewModel";
import * as Utilities from "../Utilities";
import * as Entities from "../Entities";
/** /**
* Custom binding manager of datatable * Custom binding manager of datatable
@@ -41,10 +42,6 @@ function bindDataTable(element: any, valueAccessor: any, allBindings: any, viewM
createDataTable(0, tableEntityListViewModel, queryTablesTab); // Fake a DataTable to start. createDataTable(0, tableEntityListViewModel, queryTablesTab); // Fake a DataTable to start.
$(window).resize(updateTableScrollableRegionMetrics); $(window).resize(updateTableScrollableRegionMetrics);
operationManager.focusTable(); // Also selects the first row if needed. operationManager.focusTable(); // Also selects the first row if needed.
// Attach the arrow key event handler to the table element
$dataTable.on("keydown", (event: JQueryEventObject) => {
handlearrowkey(element, valueAccessor, allBindings, viewModel, bindingContext, event);
});
} }
function onTableColumnChange(enablePrompt: boolean = true, queryTablesTab: QueryTablesTab) { function onTableColumnChange(enablePrompt: boolean = true, queryTablesTab: QueryTablesTab) {
@@ -213,39 +210,6 @@ function selectionChanged(element: any, valueAccessor: any, allBindings: any, vi
}); });
//selected = bindingContext.$data.selected(); //selected = bindingContext.$data.selected();
} }
function handlearrowkey(
element: any,
valueAccessor: any,
allBindings: any,
viewModel: any,
bindingContext: any,
event: JQueryEventObject
) {
let isUpArrowKey: boolean = event.keyCode === Constants.keyCodes.UpArrow;
let isDownArrowKey: boolean = event.keyCode === Constants.keyCodes.DownArrow;
if (isUpArrowKey || isDownArrowKey) {
let $dataTable = $(element);
let $selectedRow = $dataTable.find("tr.selected");
if ($selectedRow.length === 0) {
// No row is currently selected, select the first row
$selectedRow = $dataTable.find("tr:first");
$selectedRow.addClass("selected");
} else {
let $targetRow = isUpArrowKey ? $selectedRow.prev("tr") : $selectedRow.next("tr");
if ($targetRow.length > 0) {
// Remove the selected class from the current row and add it to the target row
$selectedRow.removeClass("selected").attr("tabindex", "-1");
$targetRow.addClass("selected").attr("tabindex", "0");
$targetRow.focus();
}
}
event.preventDefault();
}
}
function dataChanged(element: any, valueAccessor: any, allBindings: any, viewModel: any, bindingContext: any) { function dataChanged(element: any, valueAccessor: any, allBindings: any, viewModel: any, bindingContext: any) {
// do nothing for now // do nothing for now

View File

@@ -135,7 +135,6 @@
"./src/quickstart.ts", "./src/quickstart.ts",
"./src/setupTests.ts", "./src/setupTests.ts",
"./src/userContext.test.ts", "./src/userContext.test.ts",
"src/Common/EntityValue.tsx",
"./src/Platform/Hosted/Components/SwitchAccount.tsx", "./src/Platform/Hosted/Components/SwitchAccount.tsx",
"./src/Platform/Hosted/Components/SwitchSubscription.tsx" "./src/Platform/Hosted/Components/SwitchSubscription.tsx"
], ],
@@ -163,4 +162,4 @@
"src/Terminal/**/*", "src/Terminal/**/*",
"src/Utils/arm/**/*" "src/Utils/arm/**/*"
] ]
} }