Skip to content

Commit

Permalink
Change classname prefix wiz to vb (#2581) (#2588)
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
  • Loading branch information
abbyhu2000 committed Oct 18, 2022
1 parent b37e7dd commit 72684e7
Show file tree
Hide file tree
Showing 28 changed files with 59 additions and 58 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* [Multi DataSource] Add experimental callout for index pattern section ([#2523](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2523))
* [Multi DataSource] Add data source config to opensearch-dashboards-docker ([#2557](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2557))
* [Multi DataSource] Make text content dynamically translated & update unit tests ([#2570](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2570))
* [Vis Builder] Change classname prefix wiz to vb ([#2581](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2581/files))

### 🐛 Bug Fixes
* [Vis Builder] Fixes auto bounds for timeseries bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401))
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/wizard/public/application/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
@import "@elastic/eui/src/global_styling/variables/form";

$osdHeaderOffset: $euiHeaderHeightCompensation;
$wizLeftNavWidth: 462px;
$vbLeftNavWidth: 462px;
6 changes: 3 additions & 3 deletions src/plugins/wizard/public/application/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*/
@import "variables";

.wizLayout {
.vbLayout {
padding: 0;
display: grid;
grid-template:
"topNav topNav" min-content
"leftNav workspaceNav" 1fr / #{$wizLeftNavWidth} 1fr;
"leftNav workspaceNav" 1fr / #{$vbLeftNavWidth} 1fr;
height: calc(100vh - #{$osdHeaderOffset});

&__resizeContainer {
Expand All @@ -22,6 +22,6 @@
}
}

.headerIsExpanded .wizLayout {
.headerIsExpanded .vbLayout {
height: calc(100vh - #{$osdHeaderOffset * 2});
}
12 changes: 6 additions & 6 deletions src/plugins/wizard/public/application/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ export const WizardApp = () => {
return (
<I18nProvider>
<DragDropProvider>
<EuiPage className="wizLayout">
<EuiPage className="vbLayout">
<TopNav />
<LeftNav />
<EuiResizableContainer className="wizLayout__resizeContainer">
<EuiResizableContainer className="vbLayout__resizeContainer">
{(EuiResizablePanel, EuiResizableButton) => (
<>
<EuiResizablePanel
className="wizLayout__workspaceResize"
className="vbLayout__workspaceResize"
paddingSize="none"
initialSize={80}
minSize="300px"
mode="main"
>
<Workspace />
</EuiResizablePanel>
<EuiResizableButton className="wizLayout__resizeButton" />
<EuiResizableButton className="vbLayout__resizeButton" />
<EuiResizablePanel
className="wizLayout__rightNavResize"
className="vbLayout__rightNavResize"
paddingSize="none"
initialSize={20}
minSize="250px"
Expand All @@ -45,7 +45,7 @@ export const WizardApp = () => {
position: 'top',
},
]}
id="wizRightResize"
id="vbRightResize"
>
<RightNav />
</EuiResizablePanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
.wizConfig {
.vbConfig {
@include euiYScrollWithShadows;

background: $euiColorLightestShade;
Expand Down Expand Up @@ -42,7 +42,7 @@
}
}

&.showSecondary > .wizConfig__section {
&.showSecondary > .vbConfig__section {
transform: translateX(-100%);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export function ConfigPanel() {
const mainPanel = mapSchemaToAggPanel(schemas);

return (
<EuiForm className={`wizConfig ${editingState ? 'showSecondary' : ''}`}>
<div className="wizConfig__section">{mainPanel}</div>
<EuiForm className={`vbConfig ${editingState ? 'showSecondary' : ''}`}>
<div className="vbConfig__section">{mainPanel}</div>
<SecondaryPanel />
</EuiForm>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
@import "../../util";

.wizFieldSelector {
.vbFieldSelector {
@include scrollNavParent(auto 1fr);

padding: $euiSizeS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ export const FieldSelector = () => {
);

return (
<div className="wizFieldSelector">
<div className="vbFieldSelector">
<div>
<form>
<FieldSearch value={fieldSearchValue} />
</form>
</div>
<div className="wizFieldSelector__fieldGroups">
<div className="vbFieldSelector__fieldGroups">
{/* Count Field */}
<FieldSelectorField
field={{
Expand Down Expand Up @@ -102,7 +102,7 @@ interface FieldGroupProps {
const FieldGroup = ({ fields, header, id }: FieldGroupProps) => (
<EuiAccordion
id={id}
className="wizFieldSelector__fieldGroup"
className="vbFieldSelector__fieldGroup"
buttonContent={
<EuiTitle size="xxxs">
<span>{header}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
.wizFieldSelectorField {
.vbFieldSelectorField {
@include euiBottomShadowSmall;

background-color: $euiColorEmptyShade;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ export const FieldSelectorField = ({ field }: FieldSelectorFieldProps) => {
<span
data-test-subj={`field-${field.name}`}
title={field.name}
className="wizFieldSelectorField__name"
className="vbFieldSelectorField__name"
>
{wrapOnDot(field.displayName)}
</span>
);

return (
<FieldButton
className="wizFieldSelectorField"
className="vbFieldSelectorField"
isActive={infoIsOpen}
onClick={togglePopover}
dataTestSubj={`field-${field.name}-showDetails`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
@import "../../util";

.wizDataTab {
.vbDataTab {
@include scrollNavParent;

display: grid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const DATA_TAB_ID = 'data_tab';

export const DataTab = () => {
return (
<div className="wizDataTab">
<div className="vbDataTab">
<FieldSelector />
<ConfigPanel />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const mapSchemaToAggPanel = (schemas: Schemas) => {
return (
<>
<Title title="Configuration" />
<div className="wizConfig__content">{panelComponents}</div>
<div className="vbConfig__content">{panelComponents}</div>
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ export function SecondaryPanel() {
);

return (
<div className="wizConfig__section wizConfig--secondary">
<div className="vbConfig__section vbConfig--secondary">
<Title title={selectedSchema?.title ?? 'Edit'} isSecondary closeMenu={closeMenu} />
{showAggParamEditor && (
<DefaultEditorAggParams
className="wizConfig__aggEditor"
className="vbConfig__aggEditor"
agg={aggConfig!}
indexPattern={indexPattern!}
setValidity={handleSetValid}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Title = ({ title, isSecondary, closeMenu }: TitleProps) => {
);
return (
<>
<div className="wizConfig__title">
<div className="vbConfig__title">
<EuiFlexGroup gutterSize="s" alignItems="center">
{icon && <EuiFlexItem grow={false}>{icon}</EuiFlexItem>}
<EuiFlexItem>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/wizard/public/application/components/left_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { DataTab } from './data_tab';

export const LeftNav = () => {
return (
<section className="wizSidenav left">
<div className="wizDatasourceSelect wizSidenav__header">
<section className="vbSidenav left">
<div className="vbDatasourceSelect vbSidenav__header">
<DataSourceSelect />
</div>
<DataTab key="containerName" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.wizOption {
.vbOption {
background-color: $euiColorEmptyShade;
padding: $euiSizeM;

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/wizard/public/application/components/option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const Option: FC<Props> = ({ title, children, initialIsOpen = false }) =>
<EuiAccordion
id={title}
buttonContent={title}
className="wizOption"
className="vbOption"
initialIsOpen={initialIsOpen}
>
<EuiSpacer size="s" />
<EuiPanel color="subdued" className="wizOption__panel">
<EuiPanel color="subdued" className="vbOption__panel">
{children}
</EuiPanel>
</EuiAccordion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const RightNav = () => {
}));

return (
<section className="wizSidenav right">
<div className="wizSidenav__header">
<section className="vbSidenav right">
<div className="vbSidenav__header">
<EuiSuperSelect
options={options}
valueOfSelected={activeVisName}
Expand All @@ -48,7 +48,7 @@ export const RightNav = () => {
data-test-subj="chartPicker"
/>
</div>
<div className="wizSidenav__style">
<div className="vbSidenav__style">
<StyleSection />
</div>
{newVisType && (
Expand Down Expand Up @@ -90,7 +90,7 @@ export const RightNav = () => {

const OptionItem = ({ icon, title }: { icon: IconType; title: string }) => (
<>
<EuiIcon type={icon} className="wizTypeSelector__icon" />
<EuiIcon type={icon} className="vbTypeSelector__icon" />
<span>{title}</span>
</>
);
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}

&--fixedWidthChild {
width: calc(#{$wizLeftNavWidth} - #{$euiSizeXL} * 2);
width: calc(#{$vbLeftNavWidth} - #{$euiSizeXL} * 2);
}

&--selectableWrapper .euiSelectableList {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const SearchableDropdown = ({
displayError(error)
) : (
<>
<EuiPopoverTitle paddingSize="s" className="wizPopoverTitle">
<EuiPopoverTitle paddingSize="s" className="vbPopoverTitle">
{search}
</EuiPopoverTitle>
{list}
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/wizard/public/application/components/side_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@import "../util";
@import "../variables";

.wizSidenav {
.vbSidenav {
@include scrollNavParent(auto 1fr);

&.left {
Expand All @@ -30,11 +30,11 @@
}
}

.wizTypeSelector__icon {
.vbTypeSelector__icon {
margin-right: $euiSizeS;
}

.wizSidenavTabs {
.vbSidenavTabs {
.euiTab__content {
text-transform: capitalize;
}
Expand All @@ -46,6 +46,6 @@
}
}

.wizDatasourceSelect {
max-width: calc(#{$wizLeftNavWidth} - 1px);
.vbDatasourceSelect {
max-width: calc(#{$vbLeftNavWidth} - 1px);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
.wizTopNav {
.vbTopNav {
grid-area: topNav;
border-bottom: $euiBorderThin;
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const TopNav = () => {
});

return (
<div className="wizTopNav">
<div className="vbTopNav">
<TopNavMenu
appName={PLUGIN_ID}
config={config}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $animation-multiplier: 5;
$total-duartion: $animation-time * $animation-multiplier;
$keyframe-multiplier: 1 / $animation-multiplier;

.wizWorkspace {
.vbWorkspace {
display: grid;
-ms-grid-rows: auto $euiSizeM 1fr;
grid-template-rows: auto 1fr;
Expand All @@ -27,19 +27,19 @@ $keyframe-multiplier: 1 / $animation-multiplier;
}

&__handFieldSvg {
animation: wizDragAnimation #{$total-duartion}s ease-in-out infinite forwards;
animation: vbDragAnimation #{$total-duartion}s ease-in-out infinite forwards;
position: absolute;
top: 34.5%;
}
}

@media (prefers-reduced-motion) {
.wizWorkspace__handFieldSvg {
.vbWorkspace__handFieldSvg {
animation: none;
}
}

@keyframes wizDragAnimation {
@keyframes vbDragAnimation {
0% {
transform: none;
}
Expand Down
Loading

0 comments on commit 72684e7

Please sign in to comment.