Skip to content

Commit

Permalink
refactor: Update page header for edit object page (#7910)
Browse files Browse the repository at this point in the history
* refactor: update page header for edit object page

Signed-off-by: tygao <[email protected]>

* Changeset file for PR #7910 created/updated

* style: update paddingSize of settings page

Signed-off-by: tygao <[email protected]>

* test: add mock for test cases

Signed-off-by: tygao <[email protected]>

* style: update title size

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: SuZhou-Joe <[email protected]>
  • Loading branch information
3 people authored Sep 2, 2024
1 parent 6bd64f2 commit 054186f
Show file tree
Hide file tree
Showing 8 changed files with 499 additions and 31 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/7910.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
- Update page header for edit object page ([#7910](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7910))
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,22 @@ export async function mountManagementSection(
</Router>
);

const pagePaddingSize = useUpdatedUX
? // When useUpdatedUX is enabled, page should align with header vertically.
{
paddingSize: 'm' as const,
}
: {};

ReactDOM.render(
<I18nProvider>
{params.wrapInPage ? (
<EuiPageContent hasShadow={false} hasBorder={false} color="transparent">
<EuiPageContent
hasShadow={false}
hasBorder={false}
color="transparent"
{...pagePaddingSize}
>
{content}
</EuiPageContent>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ export const mountManagementSection = async ({
serviceRegistry={serviceRegistry}
setBreadcrumbs={setBreadcrumbs}
history={history}
useUpdatedUX={useUpdatedUX}
navigation={navigation}
/>
</Suspense>
</RedirectToHomeIfUnauthorized>
Expand Down Expand Up @@ -131,10 +133,22 @@ export const mountManagementSection = async ({
</Router>
);

const pageContentPaddingSize = useUpdatedUX
? // align with new header
{
paddingSize: 'm' as const,
}
: {};

ReactDOM.render(
<I18nProvider>
{mountParams.wrapInPage ? (
<EuiPageContent hasShadow={false} hasBorder={false} color="transparent">
<EuiPageContent
hasShadow={false}
hasBorder={false}
color="transparent"
{...pageContentPaddingSize}
>
{content}
</EuiPageContent>
) : (
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 054186f

Please sign in to comment.