-
Notifications
You must be signed in to change notification settings - Fork 16
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
IBX-4791: [Date picker] Cannot open date time picker by clicking on calendar icon in the input #678
Conversation
2c9e9d2
to
ce77dae
Compare
cursor: pointer; | ||
|
||
.ibexa-icon { | ||
fill: $ibexa-color-primary; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add the animation
property? Maybe this should be a modified ghost button like in the case of other action buttons from src/bundle/Resources/views/themes/admin/ui/component/input_text.html.twig
? 🤔
@@ -27,7 +27,7 @@ | |||
{% endblock %} | |||
{% block actions %} | |||
{{ parent() }} | |||
<div class="ibexa-input-text-wrapper__action-btn"> | |||
<div class="ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--calendar-icon"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking: I think that the initial idea was that it is not a button, but rather a regular icon. In such a case, the problem is not that it's not the button, but that this icon is blocking pointer events on the input. 🤔
Should this behave like a button? Wouldn't it be confusing given you can now open the picker using both input and this button? 🤔
class DateTimePicker { | ||
constructor(config) { | ||
this.container = config.container; | ||
this.fieldWrapper = this.container.querySelector('.ibexa-date-time-picker'); | ||
this.inputField = this.fieldWrapper.querySelector('.ibexa-date-time-picker__input'); | ||
this.actionsWrapper = this.fieldWrapper.querySelector('.ibexa-input-text-wrapper__actions'); | ||
this.calendarButton = this.actionsWrapper.querySelector('.ibexa-input-text-wrapper__action-btn--calendar'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick
this.calendarButton = this.actionsWrapper.querySelector('.ibexa-input-text-wrapper__action-btn--calendar'); | |
this.calendarBtn = this.actionsWrapper.querySelector('.ibexa-input-text-wrapper__action-btn--calendar'); |
@@ -27,10 +27,10 @@ | |||
{% endblock %} | |||
{% block actions %} | |||
{{ parent() }} | |||
<div class="ibexa-input-text-wrapper__action-btn"> | |||
<button type="button" class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--calendar"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we split it into multiple lines? :)
46675c4
to
efcadb4
Compare
@GrabowskiM I cannot open date time picker for airtime modal (collection block - PB) There are also some JS exceptions when I select a content: https://recordit.co/ltArbgqxvE |
efcadb4
to
52b37ea
Compare
Regression tests passed: |
b5133dc
to
152053e
Compare
152053e
to
0a3b10c
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Regression tests passed on recent changes: |
With: https://github.com/ibexa/page-builder/pull/193
Checklist:
$ composer fix-cs
)