Skip to content

Commit

Permalink
fit and finish enhancements (opensearch-project#428)
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
Signed-off-by: Sai Medhini Reddy Maryada <[email protected]>
  • Loading branch information
saimedhi authored Oct 16, 2024
1 parent 1f449af commit 3bf513a
Show file tree
Hide file tree
Showing 26 changed files with 90 additions and 81 deletions.
2 changes: 1 addition & 1 deletion public/general_components/multi_select_filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function MultiSelectFilter(props: MultiSelectFilterProps) {
}
isOpen={isPopoverOpen}
closePopover={onPopoverClose}
panelPaddingSize="none"
panelPaddingSize="s"
>
<div className="euiFilterSelect__items multi-select-filter--width">
{filters.map((filter, index) => (
Expand Down
14 changes: 7 additions & 7 deletions public/general_components/processors_title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React from 'react';
import { EuiFlexItem, EuiTitle } from '@elastic/eui';
import { EuiFlexItem, EuiText } from '@elastic/eui';

interface ProcessorsTitleProps {
title: string;
Expand All @@ -17,17 +17,17 @@ interface ProcessorsTitleProps {
export function ProcessorsTitle(props: ProcessorsTitleProps) {
return (
<EuiFlexItem grow={false}>
<EuiTitle size="s">
<EuiText size="s">
<div>
<h2
<h3
style={{ display: 'inline-block' }}
>{`${props.title} (${props.processorCount}) -`}</h2>
>{`${props.title} (${props.processorCount}) -`}</h3>
&nbsp;
<h2 style={{ display: 'inline-block', fontStyle: 'italic' }}>
<h3 style={{ display: 'inline-block', fontStyle: 'italic' }}>
optional
</h2>
</h3>
</div>
</EuiTitle>
</EuiText>
</EuiFlexItem>
);
}
12 changes: 8 additions & 4 deletions public/general_components/service_card/search_studio_card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
*/

import React from 'react';
import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui';
import {
EuiSmallButton,
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
} from '@elastic/eui';
import { i18n } from '@osd/i18n';
import { PLUGIN_ID } from '../../../common';
import { ContentManagementPluginStart } from '../../../../../src/plugins/content_management/public';
Expand All @@ -26,16 +31,15 @@ export const registerSearchStudioCard = (
const footer = (
<EuiFlexGroup justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiButton
size="s"
<EuiSmallButton
onClick={() => {
core.application.navigateToApp(PLUGIN_ID);
}}
>
{i18n.translate('flowFrameworkDashboards.searchStudioCard.footer', {
defaultMessage: 'Try OpenSearch Studio',
})}
</EuiButton>
</EuiSmallButton>
</EuiFlexItem>
</EuiFlexGroup>
);
Expand Down
2 changes: 1 addition & 1 deletion public/pages/workflow_detail/components/export_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function ExportModal(props: ExportModalProps) {
<EuiModalBody>
<EuiFlexGroup direction="column">
<EuiFlexItem grow={false}>
<EuiText>
<EuiText size="s">
{`To build out identical resources in other environments, create and provision a workflow using the below template.`}{' '}
<EuiLink href={CREATE_WORKFLOW_LINK} target="_blank">
Learn more
Expand Down
2 changes: 1 addition & 1 deletion public/pages/workflow_detail/resizable_workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
titleSize="s"
body={
<>
<EuiText>
<EuiText size="s">
Only valid workflows created from this OpenSearch Dashboards
application are editable and viewable.
</EuiText>
Expand Down
2 changes: 1 addition & 1 deletion public/pages/workflow_detail/tools/errors/errors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function Errors(props: ErrorsProps) {
return (
<>
{isEmpty(props.errorMessage) ? (
<EuiText>There are no errors.</EuiText>
<EuiText size="s">There are no errors.</EuiText>
) : (
<EuiCodeBlock fontSize="m" isCopyable={false}>
{props.errorMessage}
Expand Down
2 changes: 1 addition & 1 deletion public/pages/workflow_detail/tools/resources/resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function Resources(props: ResourcesProps) {
titleSize="s"
body={
<>
<EuiText>
<EuiText size="s">
Provision the workflow to generate resources in order to start
prototyping.
</EuiText>
Expand Down
6 changes: 3 additions & 3 deletions public/pages/workflow_detail/tools/tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
EuiPanel,
EuiTab,
EuiTabs,
EuiTitle,
EuiText,
} from '@elastic/eui';
import { Workflow } from '../../../../common';
import { Resources } from './resources';
Expand Down Expand Up @@ -117,9 +117,9 @@ export function Tools(props: ToolsProps) {
}}
>
<EuiFlexItem grow={false}>
<EuiTitle>
<EuiText size="s">
<h2>Tools</h2>
</EuiTitle>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiTabs size="s" expand={false}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React from 'react';
import { EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
import { TextField } from '../input_fields';
import { AdvancedSettings } from './advanced_settings';

Expand All @@ -17,9 +17,9 @@ export function IngestData(props: IngestDataProps) {
return (
<EuiFlexGroup direction="column">
<EuiFlexItem grow={false}>
<EuiTitle size="s">
<h2>Ingest data</h2>
</EuiTitle>
<EuiText size="s">
<h3>Ingest data</h3>
</EuiText>
</EuiFlexItem>
<EuiFlexItem>
<TextField label="Index name" fieldPath={'ingest.index.name'} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
EuiModalHeaderTitle,
EuiSpacer,
EuiText,
EuiTitle,
EuiFilterGroup,
EuiSmallFilterButton,
EuiSuperSelectOption,
Expand Down Expand Up @@ -253,7 +252,9 @@ export function SourceData(props: SourceDataProps) {
(option) =>
({
value: option.name,
inputDisplay: <EuiText>{option.name}</EuiText>,
inputDisplay: (
<EuiText size="s">{option.name}</EuiText>
),
disabled: false,
} as EuiSuperSelectOption<string>)
)}
Expand Down Expand Up @@ -288,9 +289,9 @@ export function SourceData(props: SourceDataProps) {
)}
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiTitle size="s">
<h2>Import data</h2>
</EuiTitle>
<EuiText size="s">
<h3>Source data</h3>
</EuiText>
</EuiFlexItem>
{props.lastIngested !== undefined && (
<EuiFlexItem grow={false}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export function ConfigurePromptModal(props: ConfigurePromptModalProps) {
anchorPosition="downLeft"
>
<EuiContextMenu
size="s"
initialPanelId={0}
panels={[
{
Expand All @@ -140,7 +141,7 @@ export function ConfigurePromptModal(props: ConfigurePromptModalProps) {
/>
</EuiPopover>
<EuiSpacer size="m" />
<EuiText>Prompt</EuiText>
<EuiText size="s">Prompt</EuiText>
<EuiSpacer size="s" />
<EuiCodeEditor
mode="json"
Expand Down Expand Up @@ -203,6 +204,7 @@ export function ConfigurePromptModal(props: ConfigurePromptModalProps) {
<EuiPopover
isOpen={schemaPopoverOpen}
closePopover={() => setSchemaPopoverOpen(false)}
panelPaddingSize="s"
button={
<EuiSmallButtonEmpty
onClick={() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
EuiCodeBlock,
EuiPopoverTitle,
EuiIconTip,
EuiSwitch,
EuiCompressedSwitch,
EuiCallOut,
} from '@elastic/eui';
import {
Expand Down Expand Up @@ -281,7 +281,7 @@ export function InputTransformModal(props: InputTransformModalProps) {
<EuiSpacer size="s" />
</>
)}
<EuiText>Source input</EuiText>
<EuiText size="s">Source input</EuiText>
<EuiSmallButton
style={{ width: '100px' }}
isLoading={isFetching}
Expand Down Expand Up @@ -436,7 +436,7 @@ export function InputTransformModal(props: InputTransformModalProps) {
</EuiFlexItem>
<EuiFlexItem>
<>
<EuiText>Define transform</EuiText>
<EuiText size="s">Define transform</EuiText>
<EuiSpacer size="s" />
<MapArrayField
field={props.inputMapField}
Expand Down Expand Up @@ -496,10 +496,12 @@ export function InputTransformModal(props: InputTransformModalProps) {
)}
<EuiFlexItem grow={true}>
{transformOptions.length <= 1 ? (
<EuiText>Transformed input</EuiText>
<EuiText size="s">Transformed input</EuiText>
) : (
<EuiCompressedSelect
prepend={<EuiText>Transformed input for</EuiText>}
prepend={
<EuiText size="s">Transformed input for</EuiText>
}
options={transformOptions}
value={selectedTransformOption}
onChange={(e) => {
Expand All @@ -513,6 +515,7 @@ export function InputTransformModal(props: InputTransformModalProps) {
<EuiPopover
isOpen={popoverOpen}
closePopover={() => setPopoverOpen(false)}
panelPaddingSize="s"
button={
<EuiSmallButtonEmpty
onClick={() => setPopoverOpen(!popoverOpen)}
Expand Down Expand Up @@ -562,10 +565,10 @@ export function InputTransformModal(props: InputTransformModalProps) {
<>
<EuiFlexGroup direction="row">
<EuiFlexItem grow={false}>
<EuiText>Transformed prompt</EuiText>
<EuiText size="s">Transformed prompt</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false} style={{ marginTop: '16px' }}>
<EuiSwitch
<EuiCompressedSwitch
label="Show"
checked={viewPromptDetails}
onChange={() => setViewPromptDetails(!viewPromptDetails)}
Expand All @@ -583,7 +586,7 @@ export function InputTransformModal(props: InputTransformModalProps) {
{viewPromptDetails && (
<>
<EuiSpacer size="s" />
<EuiSwitch
<EuiCompressedSwitch
label="With transformed inputs"
checked={viewTransformedPrompt}
onChange={() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export function OutputTransformModal(props: OutputTransformModalProps) {
)}
<EuiFlexGroup direction="row" justifyContent="spaceBetween">
<EuiFlexItem>
<EuiText>Source output</EuiText>
<EuiText size="s">Source output</EuiText>
</EuiFlexItem>
{!isEmpty(
parseModelOutputsObj(props.modelInterface, fullResponsePath)
Expand All @@ -212,6 +212,7 @@ export function OutputTransformModal(props: OutputTransformModalProps) {
<EuiPopover
isOpen={popoverOpen}
closePopover={() => setPopoverOpen(false)}
panelPaddingSize="s"
button={
<EuiSmallButtonEmpty
onClick={() => setPopoverOpen(!popoverOpen)}
Expand Down Expand Up @@ -382,7 +383,7 @@ export function OutputTransformModal(props: OutputTransformModalProps) {
</EuiFlexItem>
<EuiFlexItem>
<>
<EuiText>Define transform</EuiText>
<EuiText size="s">Define transform</EuiText>
<EuiSpacer size="s" />
<MapArrayField
field={props.outputMapField}
Expand Down Expand Up @@ -418,10 +419,10 @@ export function OutputTransformModal(props: OutputTransformModalProps) {
<EuiFlexItem>
<>
{transformOptions.length <= 1 ? (
<EuiText>Transformed output</EuiText>
<EuiText size="s">Transformed output</EuiText>
) : (
<EuiCompressedSelect
prepend={<EuiText>Transformed output for</EuiText>}
prepend={<EuiText size="s">Transformed output for</EuiText>}
options={transformOptions}
value={selectedTransformOption}
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export function OverrideQueryModal(props: OverrideQueryModalProps) {
anchorPosition="downLeft"
>
<EuiContextMenu
size="s"
initialPanelId={0}
panels={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export function ProcessorsList(props: ProcessorsListProps) {
anchorPosition="downLeft"
>
<EuiContextMenu
size="s"
initialPanelId={PANEL_ID}
panels={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
EuiCompressedSuperSelect,
EuiSuperSelectOption,
EuiText,
EuiTitle,
EuiSpacer,
} from '@elastic/eui';
import {
Expand Down Expand Up @@ -83,9 +82,9 @@ export function ConfigureSearchRequest(props: ConfigureSearchRequestProps) {
)}
<EuiFlexGroup direction="column">
<EuiFlexItem grow={false}>
<EuiTitle size="s">
<h2>Configure query</h2>
</EuiTitle>
<EuiText size="s">
<h3>Configure query</h3>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiCompressedFormRow label="Retrieval index">
Expand All @@ -100,7 +99,7 @@ export function ConfigureSearchRequest(props: ConfigureSearchRequestProps) {
(option) =>
({
value: option.name,
inputDisplay: <EuiText>{option.name}</EuiText>,
inputDisplay: <EuiText size="s">{option.name}</EuiText>,
disabled: false,
} as EuiSuperSelectOption<string>)
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export function EditQueryModal(props: EditQueryModalProps) {
anchorPosition="downLeft"
>
<EuiContextMenu
size="s"
initialPanelId={0}
panels={[
{
Expand Down
Loading

0 comments on commit 3bf513a

Please sign in to comment.