From 42bdcaf8d1c1266154c15401e3225d36f6a87dd0 Mon Sep 17 00:00:00 2001 From: vaidankarswapnil <81285216+vaidankarswapnil@users.noreply.github.com> Date: Thu, 25 Nov 2021 09:30:06 +0530 Subject: [PATCH] =?UTF-8?q?Fix=20radio=20buttons=20present=20under=20'Sett?= =?UTF-8?q?ings'=20blade=20like=20=E2=80=98Custom=20and=20Unlimited?= =?UTF-8?q?=E2=80=99=20along=20with=20its=20label=20=E2=80=98Page=20option?= =?UTF-8?q?s=E2=80=99=20are=20not=20enclosed=20in=20fieldset/legend=20tag?= =?UTF-8?q?=20(#1100)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix a11y setting pane radiobuttons issue * Update test snapshot issue --- less/documentDB.less | 40 +++++++++---------- .../Panes/SettingsPane/SettingsPane.tsx | 36 ++++++++++++++--- .../__snapshots__/SettingsPane.test.tsx.snap | 34 +++++++++++++--- 3 files changed, 79 insertions(+), 31 deletions(-) diff --git a/less/documentDB.less b/less/documentDB.less index 79e9435c3..72bbce880 100644 --- a/less/documentDB.less +++ b/less/documentDB.less @@ -2869,31 +2869,31 @@ a:link { } } -settings-pane { - .settingsSection { - border-bottom: 1px solid @BaseMedium; - margin-right: 24px; - padding: @MediumSpace 0px; +.settingsSection { + border-bottom: 1px solid @BaseMedium; + margin-right: 24px; + padding: @MediumSpace 0px; - &:first-child { - padding-top: 0px; - } + &:first-child { + padding-top: 0px; + padding-bottom: 10px; + } - &:last-child { - border-bottom: none; - } + &:last-child { + border-bottom: none; + } - .settingsSectionPart { - padding-left: 8px; - } + .settingsSectionPart { + padding-left: 8px; + } - .settingsSectionLabel { - margin-bottom: @DefaultSpace; - } + .settingsSectionLabel { + margin-bottom: @DefaultSpace; + margin-right: 5px; + } - .pageOptionsPart { - padding-bottom: @MediumSpace; - } + .pageOptionsPart { + padding-bottom: @MediumSpace; } } diff --git a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx index 92d432f34..2a06ce497 100644 --- a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx +++ b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx @@ -1,4 +1,4 @@ -import { Checkbox, ChoiceGroup, IChoiceGroupOption, SpinButton } from "@fluentui/react"; +import { Checkbox, ChoiceGroup, IChoiceGroupOption, SpinButton, Stack, Text } from "@fluentui/react"; import * as Constants from "Common/Constants"; import { InfoTooltip } from "Common/Tooltip/InfoTooltip"; import { configContext } from "ConfigContext"; @@ -113,20 +113,44 @@ export const SettingsPane: FunctionComponent = () => { const handleOnPageOptionChange = (ev: React.FormEvent, option: IChoiceGroupOption): void => { setPageOption(option.key); }; + + const choiceButtonStyles = { + flexContainer: [ + { + selectors: { + ".ms-ChoiceField-wrapper label": { + fontSize: 12, + paddingTop: 0, + }, + ".ms-ChoiceField": { + marginTop: 0, + }, + }, + }, + ], + }; return (
{shouldShowQueryPageOptions && (
-
-
- Page options +
+ + + Page options + Choose Custom to specify a fixed amount of query results to show, or choose Unlimited to show as many query results per page. -
- + +
{isCustomPageOptionSelected() && ( diff --git a/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap b/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap index ccc2ad3a7..4b1d6f079 100644 --- a/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap +++ b/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap @@ -14,17 +14,24 @@ exports[`Settings Pane should render Default properly 1`] = ` className="settingsSection" >
-
- Page options + + Page options + Choose Custom to specify a fixed amount of query results to show, or choose Unlimited to show as many query results per page. -
+