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

Format availability for the new style #159

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

Hlavtox
Copy link
Contributor

@Hlavtox Hlavtox commented Dec 5, 2024

Questions Answers
Description? Adapts the template to display availability in a new way. Simmilar to PrestaShop/hummingbird#658. I had to style alert warning specifically for this purpose, because it's hacked up higher in the CSS and I did not want to rewrite X other things on a dead theme. Now it looks OK.
Type? improvement
BC breaks? no
Deprecations? no
Fixed ticket?
Sponsor company
How to test?

Related core PRs

How it looks

In stock
Snímek obrazovky 2024-12-05 160232

Available on backorder
Snímek obrazovky 2024-12-06 130147

Not available (+ a new availability submessage)
Snímek obrazovky 2024-12-05 160147

Disabled (and product displayed)
Snímek obrazovky 2024-12-05 160314

ShaiMagal
ShaiMagal previously approved these changes Dec 5, 2024
@ps-jarvis ps-jarvis added the Waiting for QA Status: Waiting for QA feedback label Dec 5, 2024
@ShaiMagal ShaiMagal added this to the 3.0.0 milestone Dec 5, 2024
@florine2623 florine2623 self-assigned this Dec 5, 2024
Copy link
Contributor

@kpodemski kpodemski left a comment

Choose a reason for hiding this comment

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

I don't see a hardcoded color in this file except for your changes. Shouldn't we use existing variables or introduce a new one?

I understand that you see it as a "dead theme", but it will be a default theme for PrestaShop 9 anyway, so... let's keep things clear.

@Hlavtox
Copy link
Contributor Author

Hlavtox commented Dec 6, 2024

@kpodemski Dude, please, check the code.

You use this:

<div class="alert alert-primary" role="alert">
            <i class="material-icons">person</i> This is a primary alert—check it out!
          </div>
          <div class="alert alert-secondary" role="alert">
            <i class="material-icons">person</i> This is a secondary alert—check it out!
          </div>
          <div class="alert alert-success" role="alert">
            <i class="material-icons">person</i> This is a success alert—check it out!
          </div>
          <div class="alert alert-danger" role="alert">
            <i class="material-icons">person</i> This is a danger alert—check it out!
          </div>
          <div class="alert alert-warning" role="alert">
            <i class="material-icons">person</i> This is a warning alert—check it out!
          </div>
          <div class="alert alert-info" role="alert">
            <i class="material-icons">person</i> This is a info alert—check it out!
          </div>
          <div class="alert alert-light" role="alert">
            <i class="material-icons">person</i> This is a light alert—check it out!
          </div>
          <div class="alert alert-dark" role="alert">
            <i class="material-icons">person</i> This is a dark alert—check it out!
          </div>

You get this:

Snímek obrazovky 2024-12-06 124441

Because somebody decided it's an amazing idea to style one alert color completely differently and hack it up:

.alert-warning {
  .material-icons {
    padding-top: $extra-small-space;
    margin-right: $small-space;
    font-size: 2rem;
    color: $warning;
  }

  .alert-text {
    padding-top: $small-space;
    font-size: 0.9375rem;
  }

etc.

Copy link

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

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

Hello @Hlavtox ,

I tested this PR with PrestaShop/PrestaShop#37018.

More details on how those 2 PR were tested here : PrestaShop/PrestaShop#37018 (review)

This is validated ✅

@florine2623 florine2623 added QA ✔️ Status: QA-Approved and removed Waiting for QA Status: Waiting for QA feedback labels Dec 12, 2024
@nicosomb nicosomb merged commit 25c475a into PrestaShop:develop Dec 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA ✔️ Status: QA-Approved
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

6 participants