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

Update breadcrumbs to new styling #131

Merged
merged 10 commits into from
Feb 21, 2023

Conversation

BSFishy
Copy link
Contributor

@BSFishy BSFishy commented Nov 21, 2022

Description

Migrate breadcrumb style to OUI

2022-11-21 10_05_03-Breadcrumbs - OpenSearch UI Framework

Issues Resolved

#22

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • All tests pass
    • yarn lint
    • yarn test-unit
  • 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.

Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
@BSFishy BSFishy marked this pull request as ready for review November 21, 2022 18:05
@BSFishy BSFishy requested a review from a team as a code owner November 21, 2022 18:05
@AMoo-Miki
Copy link
Collaborator

This is for v2.0.0, right?

@BSFishy
Copy link
Contributor Author

BSFishy commented Dec 3, 2022

I think this feature is targeted for 2.0.0, if I'm not mistaken. Although I think this could technically be in a minor release, I think we're focused on pushing directly through to 2.0 right now

@KrooshalUX
Copy link
Contributor

KrooshalUX commented Dec 3, 2022 via email

@joshuarrrr
Copy link
Member

joshuarrrr commented Dec 5, 2022

This is for v2.0.0, right?

From the Dashboards perspective, we'd prefer that this be backported to 1.x, so that we can pull it in to fix some breadcrumb rendering bugs we've discovered in 2.3.0 of OpenSearch Dashboards.

@joshuarrrr
Copy link
Member

joshuarrrr commented Dec 5, 2022

This change is already live on dashboards. The work here is to integrate it into OUI. Not sure if that impacts versioning or not.

That's not quite true - this is a re-implementation/refactor of the dashboards implementation, which removes the fragile dependency on blur transforms.

Comment on lines +65 to +69
// Breadcrumbs
$ouiBreadcrumbBlueBackground: #163F66;
$ouiBreadcrumbGrayBackground: #4C636F;
$ouiBreadcrumbCollapsedLink: #FFF;
$ouiBreadCrumbHoverColor: #B0B8BB;
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a todo or issue link here? If memory serves, these colors aren't necessarily intended to be specific to breadcrumbs - they're from an upcoming theme palette. But I may be wrong about that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc @KrooshalUX to weigh in on this

Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines +230 to +237
const isFirstBreadcrumb = index === 0;
const isLastBreadcrumb = index === breadcrumbs.length - 1;

const breadcrumbWrapperClasses = classNames('ouiBreadcrumbWrapper', {
'ouiBreadcrumbWrapper--first': isFirstBreadcrumb,
'ouiBreadcrumbWrapper--last': isLastBreadcrumb,
'ouiBreadcrumbWrapper--truncate': truncate,
});
Copy link
Member

Choose a reason for hiding this comment

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

We inherited this - but do we prefer explicitly assigning first/last classes in ts vs just using pseudo selectors in the style files?

src/components/breadcrumbs/breadcrumbs.tsx Show resolved Hide resolved
src/components/breadcrumbs/breadcrumbs.tsx Show resolved Hide resolved
Comment on lines +15 to +18
$ouiBreadcrumbBlueBackground: #B9D9EB !default;
$ouiBreadcrumbGrayBackground: #D9E1E2 !default;
$ouiBreadcrumbCollapsedLink: #002A3A !default;
$ouiBreadCrumbHoverColor: #535861 !default;
Copy link
Member

Choose a reason for hiding this comment

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

If the defaults are set here, do we need to also hardcode the values into the theme?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe so, but this is more of an issue with the old theming system, which we are working towards having a cleaner, more pleasant solution for.

Copy link
Member

Choose a reason for hiding this comment

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

Is this related @BSFishy: #212?

If so, left a comment there.

color: $ouiTextSubduedColor;

&:hover {
color: $ouiBreadCrumbHoverColor !important; // sass-lint:disable-line no-important
Copy link
Member

Choose a reason for hiding this comment

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

Why all the important declarations? We should reconsider the class names and other styles that are causing these conflicts rather than just sledgehammering them.

Copy link
Member

Choose a reason for hiding this comment

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

+1 important should be avoided.

Copy link
Member

Choose a reason for hiding this comment

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

Created an issue for this: #376

Comment on lines +49 to +53
class="ouiBreadcrumbWrapper ouiBreadcrumbWrapper--first ouiBreadcrumbWrapper--last"
>
<span
aria-current="page"
class="ouiBreadcrumb ouiBreadcrumb--last"
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to have a --last class on both the wrapper and the breadcrumb? It's OK, just a little redundant and therefore fragile.

Copy link
Member

Choose a reason for hiding this comment

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

@BSFishy BSFishy changed the title Update breadcrumbs Update breadcrumbs to new styling Dec 15, 2022
@BSFishy BSFishy self-assigned this Dec 16, 2022
@BSFishy BSFishy mentioned this pull request Jan 6, 2023
2 tasks
@KrooshalUX
Copy link
Contributor

@joshuarrrr I am curious if your feedback is blocking for iteration or could those be held until a time where the team can focus on refactoring? The reason I ask is because its blocking release of the component and the documentation in #194 . We can work together to create a separate refactor issue if these pieces of feedback if its non blocking.

@kavilla kavilla linked an issue Feb 21, 2023 that may be closed by this pull request
@joshuarrrr joshuarrrr merged commit c8942c1 into opensearch-project:main Feb 21, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 21, 2023
* Remove separator

Signed-off-by: Matt Provost <provomat@amazon.com>

* Fix tests and lints

Signed-off-by: Matt Provost <provomat@amazon.com>

* Add new breadcrumb style

Signed-off-by: Matt Provost <provomat@amazon.com>

* Add new style to collapsed breadcrumbs

Signed-off-by: Matt Provost <provomat@amazon.com>

* Fix some styling issues

Signed-off-by: Matt Provost <provomat@amazon.com>

* Small cleanup

Signed-off-by: Matt Provost <provomat@amazon.com>

* Refactor wrapper implementation

Signed-off-by: Matt Provost <provomat@amazon.com>

* Add breadcrumb wall

Signed-off-by: Matt Provost <provomat@amazon.com>

* Update some colors

Signed-off-by: Matt Provost <provomat@amazon.com>

* Fix height issue

Signed-off-by: Matt Provost <provomat@amazon.com>

---------

Signed-off-by: Matt Provost <provomat@amazon.com>
(cherry picked from commit c8942c1)
seanneumann added a commit that referenced this pull request Feb 28, 2023
* Remove separator

Signed-off-by: Matt Provost <provomat@amazon.com>

* Fix tests and lints

Signed-off-by: Matt Provost <provomat@amazon.com>

* Add new breadcrumb style

Signed-off-by: Matt Provost <provomat@amazon.com>

* Add new style to collapsed breadcrumbs

Signed-off-by: Matt Provost <provomat@amazon.com>

* Fix some styling issues

Signed-off-by: Matt Provost <provomat@amazon.com>

* Small cleanup

Signed-off-by: Matt Provost <provomat@amazon.com>

* Refactor wrapper implementation

Signed-off-by: Matt Provost <provomat@amazon.com>

* Add breadcrumb wall

Signed-off-by: Matt Provost <provomat@amazon.com>

* Update some colors

Signed-off-by: Matt Provost <provomat@amazon.com>

* Fix height issue

Signed-off-by: Matt Provost <provomat@amazon.com>

---------

Signed-off-by: Matt Provost <provomat@amazon.com>
(cherry picked from commit c8942c1)

Co-authored-by: Matt Provost <provomat@amazon.com>
Co-authored-by: Sean Neumann <1413295+seanneumann@users.noreply.github.com>
BSFishy added a commit to BSFishy/oui that referenced this pull request Apr 13, 2023
Signed-off-by: Matt Provost <provomat@amazon.com>
BSFishy added a commit that referenced this pull request Apr 14, 2023
Signed-off-by: Matt Provost <provomat@amazon.com>
BSFishy added a commit to BSFishy/oui that referenced this pull request May 23, 2023
…pensearch-project#379)"

This reverts commit 70c12b0.

Signed-off-by: Matt Provost <provomat@amazon.com>
@BSFishy BSFishy deleted the update_breadcrumbs branch July 12, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UX/OUI] Move global styles header breadcrumb to OUI
5 participants