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

[admin_style_v3] As an enterprise user i can see the back office with new brand colours #10949

Conversation

jibees
Copy link
Contributor

@jibees jibees commented Jun 7, 2023

What? Why?

TODO:

  • remove icons from primary navigation
  • change to Sentence case
  • change colours and add shadows to containers (both primary and secondary nav)
  • add underline to active page (both primary and secondary nav)
Capture d’écran 2023-06-07 à 16 23 19

2023-06-07 16 25 50

What should we test?

  • As an admin, activate admin_style_v3
  • As a shop manager, see that you can see the new style for the menu
  • As an admin, desactivate admin_style_v3
  • As a shop manager, see that you cannot see the new style, and everything should be equivalent to master

Release notes

Changelog Category: User facing changes

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

@jibees jibees self-assigned this Jun 7, 2023
@jibees jibees force-pushed the 10630-buu-as-an-enterprise-user-i-can-see-the-back-office-with-new-brand-colours branch 2 times, most recently from 6a5c158 to 60b9dfd Compare June 7, 2023 12:39
@jibees jibees changed the title As an enterprise user i can see the back office with new brand colours [admin_style_v3] As an enterprise user i can see the back office with new brand colours Jun 7, 2023
@jibees jibees force-pushed the 10630-buu-as-an-enterprise-user-i-can-see-the-back-office-with-new-brand-colours branch from f95aa78 to fc428c3 Compare June 7, 2023 14:28
@jibees jibees marked this pull request as ready for review June 7, 2023 14:29
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

🤩 Great work, it's beautiful!

I submitted a new commit based on my comment, how does that look to you?

PS great commit history too, makes it super easy to follow.

text-transform: lowercase;
&::first-letter {
text-transform: uppercase;
}
Copy link
Member

Choose a reason for hiding this comment

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

Neat trick! From what I can see, this is necessary to convert "Order Cycles" to "Order cycles" and the same for "Bulk Order Management".
Why not just update the title source itself?

Hmm that took a few mins to find, I didn't realise it was quite so complicated. But still this looks like a better place to update: https://github.com/openfoodfoundation/openfoodnetwork/blob/master/app/helpers/spree/admin/navigation_helper.rb#L27-L29

I think we can use a different string helper other than .titleize

@@ -61,6 +61,8 @@ nav.menu {
}

#admin-menu {
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05), 0px 2px 2px rgba(0, 0, 0, 0.07);
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we could keep borders in variables.scss? This would help us keep them consistent where possible.

Copy link
Member

Choose a reason for hiding this comment

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

(but maybe not right now so we avoid merge conflicts!)

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

All good except the failing specs now.

app/helpers/spree/admin/navigation_helper.rb Outdated Show resolved Hide resolved
Comment on lines +2 to +10
$color-1: #ffffff !default; // White
$color-2: #9fc820 !default; // Green
$color-3: #008397 !default; // Teal (Allports)
$color-4: #6788a2 !default; // Dark Blue
$color-5: #c85136 !default; // Red/Orange (Mojo)
$color-6: #ff9300 !default; // Yellow
$color-7: #eff1f2 !default; // Light grey
$color-8: #191c1d !default; // Near-black
$color-9: #2e3132 !default; // Dark Grey
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it's difficult in the transition between styles but I find it hard to read $color-7 in CSS without knowing which one it is.

Copy link
Member

Choose a reason for hiding this comment

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

I agree, I think I'll suggest an update in a future PR.

// Probably
$teal: #008397; // Allports
// or 
$palette-teal: #008397; // Allports

// and purely for backwards-compatibility during transition:
$color-3: $palette-teal !default;

Copy link
Member

Choose a reason for hiding this comment

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

PS It's only now that I learnt what the !default modifier is for. It's like the ||= ruby operator, it assigns only if not already set.

I'm not sure if we ever make use of this, and it doesn't seem like a good idea, so I might suggest removing that too..

@dacook dacook force-pushed the 10630-buu-as-an-enterprise-user-i-can-see-the-back-office-with-new-brand-colours branch from 22a77cf to 458859d Compare June 8, 2023 06:00
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Fixed up my spec errors and applied Maikel's suggestion.

Comment on lines +2 to +10
$color-1: #ffffff !default; // White
$color-2: #9fc820 !default; // Green
$color-3: #008397 !default; // Teal (Allports)
$color-4: #6788a2 !default; // Dark Blue
$color-5: #c85136 !default; // Red/Orange (Mojo)
$color-6: #ff9300 !default; // Yellow
$color-7: #eff1f2 !default; // Light grey
$color-8: #191c1d !default; // Near-black
$color-9: #2e3132 !default; // Dark Grey
Copy link
Member

Choose a reason for hiding this comment

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

I agree, I think I'll suggest an update in a future PR.

// Probably
$teal: #008397; // Allports
// or 
$palette-teal: #008397; // Allports

// and purely for backwards-compatibility during transition:
$color-3: $palette-teal !default;

Comment on lines +2 to +10
$color-1: #ffffff !default; // White
$color-2: #9fc820 !default; // Green
$color-3: #008397 !default; // Teal (Allports)
$color-4: #6788a2 !default; // Dark Blue
$color-5: #c85136 !default; // Red/Orange (Mojo)
$color-6: #ff9300 !default; // Yellow
$color-7: #eff1f2 !default; // Light grey
$color-8: #191c1d !default; // Near-black
$color-9: #2e3132 !default; // Dark Grey
Copy link
Member

Choose a reason for hiding this comment

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

PS It's only now that I learnt what the !default modifier is for. It's like the ||= ruby operator, it assigns only if not already set.

I'm not sure if we ever make use of this, and it doesn't seem like a good idea, so I might suggest removing that too..

@@ -61,6 +61,8 @@ nav.menu {
}

#admin-menu {
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05), 0px 2px 2px rgba(0, 0, 0, 0.07);
Copy link
Member

Choose a reason for hiding this comment

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

(but maybe not right now so we avoid merge conflicts!)

@jibees jibees force-pushed the 10630-buu-as-an-enterprise-user-i-can-see-the-back-office-with-new-brand-colours branch from f11f4e4 to e2ba18f Compare June 8, 2023 09:24
@jibees
Copy link
Contributor Author

jibees commented Jun 8, 2023

Reading all your suggestions/comments/.. I think we're ready now, right?

@drummer83 drummer83 added the pr-staged-fr staging.coopcircuits.fr label Jun 9, 2023
@drummer83 drummer83 self-assigned this Jun 9, 2023
@drummer83
Copy link
Contributor

Hi @jibees,
I am assuming that this is ONLY covering the main navigation (primary and secondary) at the top of the screen, correct? The content of the pages is still showing old colors here and there. Let me know if it is already time to report the old colors which still need to be adjusted.

For the main navigation I can confirm that

  • the new colors are used when the feature toggle is active.
  • the old colors are used when the feature toggle is not active.
  • the primary as well as the secondary navigation are showing the new colors.

image

Here is an example where I think we would want to have more capital letters than just the first one. Shouldn't it be OIDC settings or OIDC Settings?
image

Here is an example where I found some tiny bits of old colors, but I assume this is not the time to report those now:
image

Conclusion

It's looking great! 🎉
I think we can merge and I will open an issue for the OIDC settings navigation. ➡️ #10982
Thanks again! 🚀

@drummer83 drummer83 merged commit 13037d2 into openfoodfoundation:master Jun 9, 2023
51 checks passed
@drummer83 drummer83 removed the pr-staged-fr staging.coopcircuits.fr label Jun 9, 2023
@jibees
Copy link
Contributor Author

jibees commented Jun 12, 2023

I am assuming that this is ONLY covering the main navigation (primary and secondary) at the top of the screen, correct?

Right.

Here is an example where I think we would want to have more capital letters than just the first one. Shouldn't it be OIDC settings or OIDC Settings?

I'd vote for OIDC Settings and not Oidc_settings :-)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUU] As an enterprise user, I can see the back office with new brand colours
4 participants