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

[SharedUX] Migrate PageTemplate > SolutionNavAvatar #128386

Merged
merged 12 commits into from
Mar 25, 2022

Conversation

majagrubic
Copy link
Contributor

@majagrubic majagrubic commented Mar 23, 2022

Summary

Migrate SolutionNavAvatar from kibana_react to sharedUXComponents. This component was originally under solution_nav module and was called solution_nav_avatar. @cchaos pointed out this is a standalone component that can live on its own and would better be called just SolutionAvatar, as it has outgrown its original purpose of being used just inside the solution navbar. Besides renaming, no major changes from the kibana_react component. The .sass for this component needs to stay for now (see comment inline).

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@majagrubic majagrubic added v8.3.0 release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Mar 23, 2022
@majagrubic majagrubic requested a review from cchaos March 23, 2022 15:47
@majagrubic majagrubic marked this pull request as ready for review March 23, 2022 15:47
@majagrubic majagrubic requested a review from a team as a code owner March 23, 2022 15:47

&--xxl {
@include euiBottomShadowMedium;
@include size(100px);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

what is this mixin? I haven't managed to find its definition in eui codebase. is it needed?

@include euiBottomShadowSmall;

&--xxl {
@include euiBottomShadowMedium;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the reason this can't be turned into emotion just yet.

className
)}
size={size === 'xxl' ? 'xl' : size}
iconSize={size}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a reason for ts-ignore and it's the weirdest typescript error I have seen.

@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

kibanamachine and others added 2 commits March 23, 2022 15:31
- Better usage example in storybook
- Added missing `color=“plain”`
- Added iconType={`logo${rest.name}`} to attempt to create the logo
Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Passed you a commit and have one possible enhancement question

/**
* Any EuiAvatar size available, or `xxl` for custom large, brand-focused version
*/
size?: EuiAvatarProps['size'] | 'xxl';
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any way we can utilize home's FeatureCatalogueSolution type here to require a Solution to pass to the name and iconType props of EuiAvatar? I really like the idea of strongly typing this usage to only be allowed specifically for solutions.

Something like:

Suggested change
size?: EuiAvatarProps['size'] | 'xxl';
size?: EuiAvatarProps['size'] | 'xxl';
solution: FeatureCatalogueSolution;

Then:

<EuiAvatar
  ...
  name={solution.name}
  iconType={solution.icon}
/>

Copy link
Contributor Author

@majagrubic majagrubic Mar 24, 2022

Choose a reason for hiding this comment

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

I like the idea, but unfortunately, that interface is only exported from the plugin, and we can't be adding dependencies on plugins here. But we have a tracking issue for that, so can add it there and change once (if 😬 ) the types are exported in a package.

Maja Grubic and others added 4 commits March 24, 2022 07:04
… page-template-3-2

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataViewEditor 131 138 +7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dataViewEditor 140.2KB 142.4KB +2.2KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/shared-ux-components 2 3 +1
Unknown metric groups

API count

id before after diff
@kbn/shared-ux-components 24 28 +4

async chunk count

id before after diff
dataViewEditor 5 6 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@majagrubic majagrubic merged commit 9fc4d00 into elastic:main Mar 25, 2022
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 128386 or prevent reminders by adding the backport:skip label.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 29, 2022
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 128386 or prevent reminders by adding the backport:skip label.

@spalger spalger added the backport:skip This commit does not require backporting label Mar 30, 2022
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants