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

indicate articles that are targets of in-product links #5948

Conversation

escattone
Copy link
Contributor

@escattone escattone commented Apr 8, 2024

mozilla/sumo#1607

Notes

  • Only members of the Staff group will see the indicator.
image image
@escattone escattone force-pushed the display-inproduct-message-for-kb-articles-1607 branch from f85947b to 1bb3e06 Compare April 9, 2024 14:43
@escattone escattone force-pushed the display-inproduct-message-for-kb-articles-1607 branch 6 times, most recently from 3a3eaf2 to 2b88c75 Compare April 17, 2024 17:43
@escattone escattone marked this pull request as ready for review April 17, 2024 17:47
@escattone escattone force-pushed the display-inproduct-message-for-kb-articles-1607 branch 2 times, most recently from 4065293 to 139d4e0 Compare April 17, 2024 21:10
@@ -57,6 +57,13 @@
{{ search_box(settings, id='support-search-sidebar', params=search_params) }}
</div>

{% if in_staff_group(user) and document.is_linked_in_product %}
<figure id="linked-in-product-indicator">
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's indent this 2 spaces in

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would also move this as a list item under the sidebar_nav in the sidebar_modules.html for consistency

Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of using grid for CSS I would go for something like:

figure {
  &.foobar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: p.$spacing-xl;
  }


  img {
    width: 24px;
    height: 24px;
  }

  figcaption {
    font-weight: 500;
    line-height: normal;
  }
}
Copy link
Contributor Author

@escattone escattone Apr 18, 2024

Choose a reason for hiding this comment

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

Regarding the SCSS, I used flex instead of grid, but not some of the other things, like align-items: center; and justify-content: space-between;, since those deviated from what Josh wanted.

Here's what it looks like on both desktop and mobile with the CSS you have above:
image

image
Copy link
Collaborator

Choose a reason for hiding this comment

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

that was merely a suggestion, the main point was to use flexbox instead of grid for this

@escattone escattone force-pushed the display-inproduct-message-for-kb-articles-1607 branch from 139d4e0 to f9c90f5 Compare April 18, 2024 18:46
@akatsoulas akatsoulas merged commit b95b0cd into mozilla:main Apr 23, 2024
2 checks passed
@escattone escattone deleted the display-inproduct-message-for-kb-articles-1607 branch April 23, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants