-
Notifications
You must be signed in to change notification settings - Fork 89
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
Update new header for Alias, Index Templates, Policy Managed Indices, Indexes and Transform Jobs #1124
Conversation
<h1>Change policy</h1> | ||
</EuiTitle> | ||
const uiSettings = getUISettings(); | ||
const useUpdatedUX = uiSettings.get("home:useNewHomePage"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
@@ -192,12 +210,12 @@ export class ChangePolicy extends Component<ChangePolicyProps, ChangePolicyState | |||
|
|||
<EuiFlexGroup alignItems="center" justifyContent="flexEnd"> | |||
<EuiFlexItem grow={false}> | |||
<EuiButtonEmpty onClick={this.onCancel} data-test-subj="changePolicyCancelButton"> | |||
<EuiButtonEmpty size={useUpdatedUX ? "s" : "l"} onClick={this.onCancel} data-test-subj="changePolicyCancelButton"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use undefined
@@ -45,7 +47,20 @@ export class CreateIndex extends Component<CreateIndexProps> { | |||
render() { | |||
const isEdit = this.isEdit; | |||
|
|||
return ( | |||
const uiSettings = getUISettings(); | |||
const useUpdatedUX = uiSettings.get("home:useNewHomePage"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
const uiSettings = getUISettings(); | ||
const useUpdatedUX = uiSettings.get("home:useNewHomePage"); | ||
|
||
return !useUpdatedUX ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
@@ -192,8 +196,79 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref<FieldInstance>) => | |||
</EuiFlexItem> | |||
); | |||
|
|||
return ( | |||
<> | |||
const uiSettings = getUISettings(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass it as Props for TemplateDetails
<> | ||
<HeaderControl controls={HeaderRight} setMountPoint={setAppRightControls} /> | ||
</> | ||
) : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be modified as. :
{isEdit ? (
<HeaderControl controls={HeaderRight} setMountPoint={setAppRightControls} />
) : <HeaderControl controls={descriptionData} setMountPoint={setAppDescriptionControls} />}
const useUpdatedUX = uiSettings.get("home:useNewHomePage"); | ||
|
||
return useUpdatedUX ? ( | ||
<EuiFlexGroup style={{ padding: "0px 5px 16px 5px" }} alignItems="center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirm this padding
const uiSettings = getUISettings(); | ||
const useUpdatedUX = uiSettings.get("home:useNewHomePage"); | ||
|
||
const size = useUpdatedUX ? "s" : "m"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined
0161288
to
e05899f
Compare
Signed-off-by: Kshitij Tandon <[email protected]>
Signed-off-by: Kshitij Tandon <[email protected]>
Signed-off-by: Kshitij Tandon <[email protected]>
Signed-off-by: Kshitij Tandon <[email protected]>
Signed-off-by: Kshitij Tandon <[email protected]>
cr: https://code.amazon.com/reviews/CR-143602949 Signed-off-by: Kshitij Tandon <[email protected]>
Signed-off-by: Kshitij Tandon <[email protected]>
Signed-off-by: Kshitij Tandon <[email protected]>
Signed-off-by: Kshitij Tandon <[email protected]>
Signed-off-by: Kshitij Tandon <[email protected]>
e05899f
to
1e6df0b
Compare
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center"> | ||
{actions.map(({ text, buttonProps = {}, flexItemProps = {}, modal = null, children }, index) => { | ||
let button = children ? ( | ||
children | ||
) : ( | ||
<EuiButton {...buttonProps} data-test-subj={`${text}Button`}> | ||
<EuiButton {...buttonProps} data-test-subj={`${text}Button`} size={size ? size : "m"}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just size is good enough, m is the default value of EuiButton size I remember.
@@ -109,6 +109,7 @@ export default class ChangeManagedIndices extends Component<ChangeManagedIndices | |||
// @ts-ignore | |||
onChange={this.props.onChangeManagedIndices} | |||
onSearchChange={this.onManagedIndexSearchChange} | |||
compressed={useUpdatedUX ? true : false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compressed={useUpdatedUX ? true : false} | |
compressed={useUpdatedUX ? true : undefined} |
undefined is preferred, and i just feel that it is totally OK to use a compressed ComboBox no matter the toggle is on or off, Or it can be a huge maintenance effort.
@tandonks Please split the PR into several smaller PRs next time. It's a big pressure for maintainers to review such a huge PR. |
The backport to
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/index-management-dashboards-plugin/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/index-management-dashboards-plugin/backport-2.x
# Create a new branch
git switch --create backport/backport-1124-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 da229f8f7f08e0acc9094aa51c6bd407db295e60
# Push it to GitHub
git push --set-upstream origin backport/backport-1124-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/index-management-dashboards-plugin/backport-2.x Then, create a pull request where the |
… Indexes and Transform Jobs (opensearch-project#1124) * wip: changes for new ui Signed-off-by: Kshitij Tandon <[email protected]> * New UI changes Signed-off-by: Kshitij Tandon <[email protected]> * Header Changes Signed-off-by: Kshitij Tandon <[email protected]> * New UI changes Signed-off-by: Kshitij Tandon <[email protected]> * UTs handel Signed-off-by: Kshitij Tandon <[email protected]> * Header UI changes cr: https://code.amazon.com/reviews/CR-143602949 Signed-off-by: Kshitij Tandon <[email protected]> * Updated Change Policy Page Signed-off-by: Kshitij Tandon <[email protected]> * Fixed bug in alias for new UI Signed-off-by: Kshitij Tandon <[email protected]> * Fixing a few bugs and addressing comments Signed-off-by: Kshitij Tandon <[email protected]> * Fixing a few bugs in old UI Signed-off-by: Kshitij Tandon <[email protected]> --------- Signed-off-by: Kshitij Tandon <[email protected]>
… Indexes and Transform Jobs (#1124) (#1137) * wip: changes for new ui * New UI changes * Header Changes * New UI changes * UTs handel * Header UI changes cr: https://code.amazon.com/reviews/CR-143602949 * Updated Change Policy Page * Fixed bug in alias for new UI * Fixing a few bugs and addressing comments * Fixing a few bugs in old UI --------- Signed-off-by: Kshitij Tandon <[email protected]>
Description
New Header UI changes for Alias, Indexes, Templates, Transforms and Policy Managed Indexes for ISM dashboard pages
Issues Resolved
[List any issues this PR will resolve]
Check List
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.
Policy Managed Indexes (NewUI)
Policy Managed Indexes (OldUI)
Indexes (NewUI)
Indexes (OldUI)
Index Aliases (NewUI)
Index Aliases (OldUI)
Templates (NewUI)
Templates (OldUI)
Transforms (NewUI)
Transforms (OldUI)