Compare commits

...

10 Commits

Author SHA1 Message Date
MokireddySampath
95f7d57c12 Update TableEntity.tsx 2023-06-27 23:33:08 +05:30
MokireddySampath
da9d3d7c07 Update TableEntity.tsx 2023-06-27 23:27:52 +05:30
MokireddySampath
36fce36c47 Update TableEntity.tsx 2023-06-27 23:22:49 +05:30
Sampath
0be447f4d9 label has been added to the dropdown and text fields in add table row dialog 2023-06-27 23:03:55 +05:30
MokireddySampath
42e24d0e99 add property is readout twice while using screenreader (#1463)
* arialabel has been added to close button of invitational youtube video

* heading role has been addedd and tag has been changed to h1

* outline has been restored to choose columns link in entities page

* header text color changed to meet luminosity ratio requirement

* capacity calculator link has been added with underline on focus

* add property is readout twice while using screenreader

* Update fulldatatables.less

* Update queryBuilder.less

* Update TableEntity.tsx

* Update ThroughputInput.less

* Update ThroughputInput.tsx

* Update ThroughputInput.tsx

* Update ThroughputInput.test.tsx.snap

* Update QuickstartCarousel.tsx

* Update SplashScreen.tsx
2023-06-27 10:10:13 +05:30
MokireddySampath
c11b6838e5 aria label added to add property button (#1464)
* arialabel has been added to close button of invitational youtube video

* heading role has been addedd and tag has been changed to h1

* outline has been restored to choose columns link in entities page

* header text color changed to meet luminosity ratio requirement

* capacity calculator link has been added with underline on focus

* add property is readout twice while using screenreader

* arialabel added to the add property button

* Update fulldatatables.less

* Update queryBuilder.less

* Update TableEntity.tsx

* Update ThroughputInput.less

* Update ThroughputInput.tsx

* Update ThroughputInput.test.tsx.snap

* Update ThroughputInput.test.tsx.snap

* Update AddTableEntityPanel.tsx

* Update AddTableEntityPanel.test.tsx.snap

* Update QuickstartCarousel.tsx

* Update SplashScreen.tsx
2023-06-27 10:08:59 +05:30
MokireddySampath
1350122f76 arialabel has been added to close button of invitational youtube video (#1449) 2023-06-27 10:04:58 +05:30
MokireddySampath
7c88a4d65b defect2270063 (#1477)
* arialabel has been added to close button of invitational youtube video

* heading role has been addedd and tag has been changed to h1

* outline has been restored to choose columns link in entities page

* Update QuickstartCarousel.tsx

* Update SplashScreen.tsx

* Update TableEntity.tsx

* outline for edit entity has been added on focus

* keyboard accessibility added to rows in table entities

* learn more link under analytical store

* Column header is populated with text

* aria label has been changed for  the screen readers to read placeholder text along with label text

* role and alt text has been added to presentation images

* Update queryBuilder.less

* Update TableEntity.tsx

* Update ThroughputInputAutoPilotV3Component.tsx

* Update ThroughputInputAutoPilotV3Component.tsx

* Update ThroughputInputAutoPilotV3Component.test.tsx.snap

* Update ThroughputInput.less

* Update DataTableBindingManager.ts

* Update AddCollectionPanel.test.tsx.snap

* Update PanelComponent.less

* Update AddCollectionPanel.tsx
2023-06-26 23:55:00 +05:30
v-darkora
0b6cb8ee3d [Query Copilot] Adding loading spinner for Copilot tab (#1494)
* Add loading spinner for react tabs

* Run prettier and import useTabs instead of passing it
2023-06-26 09:13:30 +02:00
vchske
15e8c66aa4 Fix for softAllowedMaximumThroughput issue when using sdk (#1501) 2023-06-23 12:04:56 -07:00
12 changed files with 59 additions and 17 deletions

View File

@@ -650,4 +650,4 @@ tr:hover td.nameColumnText {
.context-menu-item.icon-customize-columns {
background-image: url(../../images/Options.svg);
}
}

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;
@@ -60,6 +61,7 @@ export const EntityValue: FunctionComponent<TableEntityProps> = ({
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";
@@ -33,10 +34,10 @@ export interface TableEntityProps {
isPropertyTypeDisable: boolean;
entityTimeValue: string;
isEntityValueDisable?: boolean;
onDeleteEntity?: () => void;
onEditEntity?: () => void;
onDeleteEntity: () => void;
onEditEntity: () => void;
onEntityPropertyChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
onEntityTypeChange: (event: React.FormEvent<HTMLElement>, selectedParam: IDropdownOption) => void;
onEntityTypeChange: (event: React.FormEvent<HTMLDivElement>, option?: IDropdownOption<any> | undefined) => 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}

View File

@@ -133,8 +133,10 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
if (isDirty(this.props.maxAutoPilotThroughput, this.props.maxAutoPilotThroughputBaseline)) {
isDiscardable = true;
if (
this.props.maxAutoPilotThroughput <= this.props.softAllowedMaximumThroughput &&
AutoPilotUtils.isValidAutoPilotThroughput(this.props.maxAutoPilotThroughput)
this.props.softAllowedMaximumThroughput
? this.props.maxAutoPilotThroughput <= this.props.softAllowedMaximumThroughput &&
AutoPilotUtils.isValidAutoPilotThroughput(this.props.maxAutoPilotThroughput)
: AutoPilotUtils.isValidAutoPilotThroughput(this.props.maxAutoPilotThroughput)
) {
isSaveable = true;
}

View File

@@ -205,6 +205,7 @@ export const NewVertexComponent: FunctionComponent<INewVertexComponentProps> = (
role="button"
onClick={onAddNewProperty}
onKeyPress={(event: React.KeyboardEvent<HTMLSpanElement>) => onAddNewPropertyKeyPress(event)}
aria-label="Add property"
>
<img className="refreshcol rightPaneAddPropertyImg" src={AddIcon} alt="Add property" /> Add Property
</span>

View File

@@ -295,8 +295,9 @@ export const AddTableEntityPanel: FunctionComponent<AddTableEntityPanelProps> =
className="addButtonEntiy"
tabIndex={0}
onKeyPress={handlekeypressaddentity}
aria-label="Add Property"
>
<Image {...imageProps} src={AddPropertyIcon} alt="Add Entity" />
<Image {...imageProps} src={AddPropertyIcon} alt="Add Property" />
<Text className="addNewParamStyle">{getAddButtonLabel(userContext.apiType)}</Text>
</Stack>
)}

View File

@@ -26,6 +26,7 @@ exports[`Excute Add Table Entity Pane should render Default properly 1`] = `
className="panelMainContent"
>
<Stack
aria-label="Add Property"
className="addButtonEntiy"
horizontal={true}
onClick={[Function]}
@@ -33,20 +34,21 @@ exports[`Excute Add Table Entity Pane should render Default properly 1`] = `
tabIndex={0}
>
<div
aria-label="Add Property"
className="ms-Stack addButtonEntiy css-53"
onClick={[Function]}
onKeyPress={[Function]}
tabIndex={0}
>
<StyledImageBase
alt="Add Entity"
alt="Add Property"
height={30}
key=".0:$.0"
src=""
width={16}
>
<ImageBase
alt="Add Entity"
alt="Add Property"
height={30}
src=""
styles={[Function]}
@@ -335,7 +337,7 @@ exports[`Excute Add Table Entity Pane should render Default properly 1`] = `
}
>
<img
alt="Add Entity"
alt="Add Property"
className="ms-Image-image ms-Image-image--portrait is-notLoaded is-fadeIn image-55"
key="fabricImage"
onError={[Function]}

View File

@@ -39,6 +39,7 @@ import SplitterLayout from "react-splitter-layout";
import CopilotIcon from "../../../images/Copilot.svg";
import ExecuteQueryIcon from "../../../images/ExecuteQuery.svg";
import SaveQueryIcon from "../../../images/save-cosmos.svg";
import { useTabs } from "../../hooks/useTabs";
interface QueryCopilotTabProps {
initialInput: string;
@@ -73,6 +74,7 @@ export const QueryCopilotTab: React.FC<QueryCopilotTabProps> = ({
const generateSQLQuery = async (): Promise<void> => {
try {
setIsGeneratingQuery(true);
useTabs.getState().setIsTabExecuting(true);
const payload = {
containerSchema: QueryCopilotSampleContainerSchema,
userPrompt: userInput,
@@ -101,6 +103,7 @@ export const QueryCopilotTab: React.FC<QueryCopilotTabProps> = ({
throw error;
} finally {
setIsGeneratingQuery(false);
useTabs.getState().setIsTabExecuting(false);
}
};
@@ -119,6 +122,7 @@ export const QueryCopilotTab: React.FC<QueryCopilotTabProps> = ({
const queryDocumentsPerPage = async (firstItemIndex: number, queryIterator: MinimalQueryIterator): Promise<void> => {
try {
setIsExecuting(true);
useTabs.getState().setIsTabExecuting(true);
const queryResults: QueryResults = await queryPagesUntilContentPresent(
firstItemIndex,
async (firstItemIndex: number) =>
@@ -133,6 +137,7 @@ export const QueryCopilotTab: React.FC<QueryCopilotTabProps> = ({
handleError(errorMessage, "executeQueryCopilotTab");
} finally {
setIsExecuting(false);
useTabs.getState().setIsTabExecuting(false);
}
};

View File

@@ -1,10 +1,10 @@
import { DefaultButton, IconButton, Image, Modal, PrimaryButton, Stack, Text } from "@fluentui/react";
import { useCarousel } from "hooks/useCarousel";
import React, { useState } from "react";
import Youtube from "react-youtube";
import { Action } from "Shared/Telemetry/TelemetryConstants";
import { traceSuccess } from "Shared/Telemetry/TelemetryProcessor";
import { userContext } from "UserContext";
import { useCarousel } from "hooks/useCarousel";
import React, { useState } from "react";
import Youtube from "react-youtube";
import Image1 from "../../../images/CarouselImage1.svg";
import Image2 from "../../../images/CarouselImage2.svg";
@@ -25,7 +25,7 @@ export const QuickstartCarousel: React.FC<QuickstartCarouselProps> = ({
<Stack>
<Stack horizontal horizontalAlign="space-between" style={{ padding: 16 }}>
<Text variant="xLarge">{getHeaderText(page)}</Text>
<IconButton iconProps={{ iconName: "Cancel" }} onClick={() => setPage(4)} />
<IconButton iconProps={{ iconName: "Cancel" }} onClick={() => setPage(4)} ariaLabel="Close" />
</Stack>
{getContent(page)}
<Text variant="medium" style={{ padding: "0 16px" }}>

View File

@@ -77,7 +77,13 @@
<div class="addClause" data-bind=" ">
<div class="addClause-heading">
<span class="clause-table addClause-title">
<img class="addclauseProperty-Img" style="margin-bottom: 5px" src="/Add-property.svg" />
<img
class="addclauseProperty-Img"
style="margin-bottom: 5px"
src="/Add-property.svg"
alt="Add new Clause"
role="presentation"
/>
<span style="margin-left: 5px" data-bind="text: addNewClauseLine"></span>
</span>
</div>
@@ -119,7 +125,12 @@
aria-label="Show top results"
/>
<div role="alert" aria-atomic="true" class="inline-div" data-bind="visible: isExceedingLimit">
<img class="advanced-options-icon" src="/QueryBuilder/StatusWarning_16x.png" />
<img
class="advanced-options-icon"
src="/QueryBuilder/StatusWarning_16x.png"
alt="Warning"
role="presentation"
/>
<span data-bind="text: topValueLimitMessage"></span>
</div>
</div>

View File

@@ -113,7 +113,7 @@ function TabNav({ tab, active, tabKind }: { tab?: Tab; active: boolean; tabKind?
<div className="tab_Content">
<span className="statusIconContainer" style={{ width: tabKind === ReactTabKind.Home ? 0 : 18 }}>
{useObservable(tab?.isExecutionError || ko.observable(false)) && <ErrorIcon tab={tab} active={active} />}
{useObservable(tab?.isExecuting || ko.observable(false)) && (
{isTabExecuting(tab, tabKind) && (
<img className="loadingIcon" title="Loading" src={loadingIcon} alt="Loading" />
)}
</span>
@@ -211,6 +211,15 @@ const onKeyPressReactTab = (e: KeyboardEvent, tabKind: ReactTabKind): void => {
}
};
const isTabExecuting = (tab?: Tab, tabKind?: ReactTabKind): boolean => {
if (useObservable(tab?.isExecuting || ko.observable(false))) {
return true;
} else if (tabKind !== undefined && tabKind !== ReactTabKind.Home && useTabs.getState()?.isTabExecuting) {
return true;
}
return false;
};
const getReactTabContent = (activeReactTab: ReactTabKind, explorer: Explorer): JSX.Element => {
switch (activeReactTab) {
case ReactTabKind.Connect:

View File

@@ -11,6 +11,7 @@ interface TabsState {
activeReactTab: ReactTabKind | undefined;
networkSettingsWarning: string;
queryCopilotTabInitialInput: string;
isTabExecuting: boolean;
activateTab: (tab: TabsBase) => void;
activateNewTab: (tab: TabsBase) => void;
activateReactTab: (tabkind: ReactTabKind) => void;
@@ -24,6 +25,7 @@ interface TabsState {
closeReactTab: (tabKind: ReactTabKind) => void;
setNetworkSettingsWarning: (warningMessage: string) => void;
setQueryCopilotTabInitialInput: (input: string) => void;
setIsTabExecuting: (state: boolean) => void;
}
export enum ReactTabKind {
@@ -40,6 +42,7 @@ export const useTabs: UseStore<TabsState> = create((set, get) => ({
activeReactTab: ReactTabKind.Home,
networkSettingsWarning: "",
queryCopilotTabInitialInput: "",
isTabExecuting: false,
activateTab: (tab: TabsBase): void => {
if (get().openedTabs.some((openedTab) => openedTab.tabId === tab.tabId)) {
set({ activeTab: tab, activeReactTab: undefined });
@@ -151,4 +154,7 @@ export const useTabs: UseStore<TabsState> = create((set, get) => ({
},
setNetworkSettingsWarning: (warningMessage: string) => set({ networkSettingsWarning: warningMessage }),
setQueryCopilotTabInitialInput: (input: string) => set({ queryCopilotTabInitialInput: input }),
setIsTabExecuting: (state: boolean) => {
set({ isTabExecuting: state });
},
}));