Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Page Header] New page header for applications and UI updates #2081

Merged
merged 8 commits into from
Aug 24, 2024

Conversation

TackAdam
Copy link
Collaborator

@TackAdam TackAdam commented Aug 21, 2024

Description

  1. Updates the applications UI and registers the create button to the header.
  2. Removes Logs from the application options while under new navigation as it is not available.

Old Applications under new navigation:
Screenshot 2024-08-21 at 11 11 48 AM
After changes:
Screenshot 2024-08-21 at 2 34 43 PM

Old applications without new navigation:
Screenshot 2024-08-21 at 11 13 40 AM
After changes:
Screenshot 2024-08-22 at 2 49 06 PM

Video of new actions working (removed button and added to table):

Screen.Recording.2024-08-21.at.11.14.19.AM.mov

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Adam Tackett and others added 3 commits August 21, 2024 11:08
@TackAdam TackAdam added the enhancement New feature or request label Aug 22, 2024
Signed-off-by: Adam Tackett <[email protected]>
@TackAdam TackAdam marked this pull request as ready for review August 22, 2024 16:06
Comment on lines 140 to 141
float: 'left',
width: '100%',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these needed anymore. Cause when we removed the mac width the other two css lines became irrelevant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed pageStyle, was also used in notebooks so was going to do it separately but removed from both.

return (
<>
{components.map((component, index) =>
React.cloneElement(component, { key: `component-fallback-${index}` })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need clone element here? Also, why do we have this key named as component-fallback

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed now just using
return <>{components}</>;

Comment on lines 523 to 536
{!newNavigation && (
<>
<EuiTitle size="l">
<h1 data-test-subj="applicationTitle">{application.name}</h1>
</EuiTitle>
<EuiText>
<p>{application.description}</p>
</EuiText>
</>
)}
{newNavigation && (
<HeaderControlledComponentsWrapper description={application.description} />
)}
</EuiPageHeaderSection>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. Would this be cleaner?

     {newNavigation ? 
        (<HeaderControlledComponentsWrapper description={application.description} />) 
       :  (
              <>
                <EuiTitle size="l">
                  <h1 data-test-subj="applicationTitle">{application.name}</h1>
                </EuiTitle>
                <EuiText>
                  <p>{application.description}</p>
                </EuiText>
              </>
            )}
            

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, have adjusted thank you

<div style={pageStyles}>
<>
{!newNavigation && (
<div style={{ paddingLeft: '16px', paddingTop: '8px' }}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can may be remove these custom styles.

Copy link
Collaborator Author

@TackAdam TackAdam Aug 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with EuiPageHeader

Adam Tackett added 3 commits August 22, 2024 13:35
Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
@TackAdam TackAdam merged commit dd544f7 into opensearch-project:main Aug 24, 2024
12 of 18 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-observability/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-observability/backport-2.x
# Create a new branch
git switch --create backport/backport-2081-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 dd544f708d1aed95d2b4e2d7ae7c0eb45b37398a
# Push it to GitHub
git push --set-upstream origin backport/backport-2081-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-observability/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-2081-to-2.x.

TackAdam added a commit to TackAdam/dashboards-observability that referenced this pull request Aug 24, 2024
…arch-project#2081)

* Page header updates for applications

Signed-off-by: Adam Tackett <[email protected]>

* small adjustments

Signed-off-by: Adam Tackett <[email protected]>

* update snapshots

Signed-off-by: Adam Tackett <[email protected]>

* update from comments

Signed-off-by: Adam Tackett <[email protected]>

* remove custom css

Signed-off-by: Adam Tackett <[email protected]>

* update snapshots from osd

Signed-off-by: Adam Tackett <[email protected]>

---------

Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: Adam Tackett <[email protected]>
(cherry picked from commit dd544f7)
TackAdam added a commit that referenced this pull request Aug 26, 2024
…updates (#2081) (#2095)

* [Page Header] New page header for applications and UI updates (#2081)

* Page header updates for applications

Signed-off-by: Adam Tackett <[email protected]>

* small adjustments

Signed-off-by: Adam Tackett <[email protected]>

* update snapshots

Signed-off-by: Adam Tackett <[email protected]>

* update from comments

Signed-off-by: Adam Tackett <[email protected]>

* remove custom css

Signed-off-by: Adam Tackett <[email protected]>

* update snapshots from osd

Signed-off-by: Adam Tackett <[email protected]>

---------

Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: Adam Tackett <[email protected]>
(cherry picked from commit dd544f7)

* fixing lint errors

Signed-off-by: Adam Tackett <[email protected]>

---------

Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: Adam Tackett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants