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 {
margin-left: 4px;
cursor: pointer;
padding: 2px;
outline: none;
}
.query-panel .row .column-headers .Field {

View File

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

View File

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

View File

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

View File

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

View File

@@ -14,7 +14,3 @@
.throughputInputSpacing > :not(:last-child) {
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 { CollapsibleSectionComponent } from "../Controls/CollapsiblePanel/CollapsibleSectionComponent";
import { ThroughputInput } from "../Controls/ThroughputInput/ThroughputInput";
import "../Controls/ThroughputInput/ThroughputInput.less";
import { ContainerSampleGenerator } from "../DataSamples/ContainerSampleGenerator";
import Explorer from "../Explorer";
import { useDatabases } from "../useDatabases";
@@ -844,11 +843,7 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
<Text variant="small">
Azure Synapse Link is required for creating an analytical store{" "}
{getCollectionName().toLocaleLowerCase()}. Enable Synapse Link for this Cosmos DB account.{" "}
<Link
href="https://aka.ms/cosmosdb-synapselink"
target="_blank"
className="capacitycalculator-link"
>
<Link href="https://aka.ms/cosmosdb-synapselink" target="_blank">
Learn more
</Link>
</Text>

View File

@@ -112,9 +112,6 @@
margin-top: 28px;
margin-left: 4px !important;
}
.addRemoveIcon [alt="editEntity"]:focus,.addRemoveIconLabel [alt="editEntity"]:focus{
border:1px dashed #605E5C
}
.addNewParamStyle {
margin-top: 5px;
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.
<StyledLinkBase
className="capacitycalculator-link"
href="https://aka.ms/cosmosdb-synapselink"
target="_blank"
>

View File

@@ -1,14 +1,15 @@
import * as ko from "knockout";
import * as _ from "underscore";
import QueryTablesTab from "../../Tabs/QueryTablesTab";
import * as Constants from "../Constants";
import * as Entities from "../Entities";
import * as Utilities from "../Utilities";
import * as ViewModels from "../../../Contracts/ViewModels";
import * as DataTableBuilder from "./DataTableBuilder";
import DataTableOperationManager from "./DataTableOperationManager";
import * as DataTableOperations from "./DataTableOperations";
import QueryTablesTab from "../../Tabs/QueryTablesTab";
import TableEntityListViewModel from "./TableEntityListViewModel";
import * as Utilities from "../Utilities";
import * as Entities from "../Entities";
/**
* 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.
$(window).resize(updateTableScrollableRegionMetrics);
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) {
@@ -213,39 +210,6 @@ function selectionChanged(element: any, valueAccessor: any, allBindings: any, vi
});
//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) {
// do nothing for now

View File

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