- Issue created by @Grevil
- π©πͺGermany Anybody Porta Westfalica
@thomas.frobieter any plans before we tag the new stable release?
thomas.frobieter β made their first commit to this issueβs fork.
- Assigned to Anybody
- Status changed to Needs review
8 months ago 1:35pm 9 September 2024 - Assigned to thomas.frobieter
- Status changed to Needs work
8 months ago 1:43pm 9 September 2024 - π©πͺGermany Anybody Porta Westfalica
@thomas.frobieter: Great! Just one thing:
availability_indicator
is missing now! - Merge request !21Issue #3455082: Fully implement, adjust and review the... β (Merged) created by Anybody
- Status changed to Postponed
8 months ago 2:14pm 9 September 2024 Okay, so it turns out heres alot of work todo, so we need to postpone this.
- CSS & Library entfernen
- show_availability_indicator Property entfernen
- Logik aus der Feldbeschreibung nachbauen
- Logik im PHP lΓΆschen: https://git.drupalcode.org/project/commerce_product_availability/-/merge...
- Template-Variablen entfernen: https://git.drupalcode.org/project/commerce_product_availability/-/merge...
- Beschreibungen aktualisieren: https://git.drupalcode.org/project/commerce_product_availability/-/merge...
- Status changed to Needs work
8 months ago 2:17pm 9 September 2024 - Assigned to Anybody
- π©πͺGermany Anybody Porta Westfalica
The logic is ready, it just needs to be added similar to the logic before, then it's done.
I'll prepare it, then we can change the values, if you want them not to use color names.
- Issue was unassigned.
- Status changed to RTBC
8 months ago 2:35pm 9 September 2024 - π©πͺGermany Anybody Porta Westfalica
RTBC from my side. Uses the setting now and preserves the logic in PHP as expected.
- Status changed to Needs work
8 months ago 2:44pm 9 September 2024 Multiple things to solve:
1) Using colors as classnames is bad practice. Thats why Bootstrap & Co. are using "success", "warning" and "danger", instead "green", "yellow" and "red". And because of this availability_status is much more appropriate here.
2) The whole naming about "availability_indicator" is not clear - at least not clear to me. And because in my world its conflicting with availability_status is have no better name for this, because I would'nt solve it this way at all.
3) What is the difference of the availability_indicator and the availability_status (for the frontend side). Why not simply set the availability_status to "not_available", instead sperading a second variable? In theory there might be a case where the product ist in stock but not buyable. If we need to cover this case, we better have a boolean variable in the template, that tells us if the product ist buyable or not.- π©πͺGermany Anybody Porta Westfalica
Using colors as classnames is bad practice. Thats why Bootstrap & Co. are
using "success", "warning" and "danger", instead "green", "yellow" and "red".
And because of this availability_status is much more appropriate here.We could name it
- available
- limited
- unavailable
for example if that's better?
- π©πͺGermany Anybody Porta Westfalica
What is the difference of the availability_indicator and the availability_status (for the frontend side). Why not simply set the availability_status to "not_available", instead seperating a second variable? In theory there might be a case where the product is in stock but not buyable. If we need to cover this case, we better have a boolean variable in the template, that tells us if the product ist buyable or not.
We already have these two separate settings. But the icon combines both and adds the option to show / hide the icon. And the logic to do so shouldn't be in theme.
If we had more time, we could discuss a better name for
availability_indicator
indeed (something like "the real result of buyable and availability to show as icon", but I think it will cost a lot of time and make things even more complicated for little benefit. - Assigned to thomas.frobieter
- Status changed to Needs review
8 months ago 3:04pm 9 September 2024 - Status changed to RTBC
8 months ago 3:18pm 9 September 2024 Okay, so regardless of naming - which, as is often the case, can be argued about for a long time - the availability_indicator now contains all the necessary status to set appropriate classes. That works for me, thank you.
-
thomas.frobieter β
committed e25a06b1 on 1.x authored by
anybody β
Issue #3455082 by thomas.frobieter, anybody, grevil: Fully implement,...
-
thomas.frobieter β
committed e25a06b1 on 1.x authored by
anybody β
- Status changed to Fixed
8 months ago 3:18pm 9 September 2024 - π©πͺGermany Grevil
Changing "getAvailabilityIndicatorColor" to "getAvailabilityIndicator" without a BC record is not a good idea!
Automatically closed - issue fixed for 2 weeks with no activity.