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

IBX-3973: Nontranslatable and disabled fields are not greyed out in content editing UI #616

Merged
merged 6 commits into from
Nov 18, 2022

Conversation

GrabowskiM
Copy link
Contributor

@GrabowskiM GrabowskiM commented Oct 19, 2022

Question Answer
Tickets https://issues.ibexa.co/browse/IBX-3973
Bug fix? yes
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@GrabowskiM GrabowskiM marked this pull request as draft October 19, 2022 13:58
@GrabowskiM GrabowskiM changed the title IBX-3973: Nontranslatable and disabled fields are not greyed out in c… IBX-3973: Nontranslatable and disabled fields are not greyed out in content editing UI Oct 20, 2022
@GrabowskiM GrabowskiM requested review from dew326, tischsoic, lucasOsti and Gengar-i and removed request for dew326 October 21, 2022 10:15
@GrabowskiM GrabowskiM marked this pull request as ready for review October 21, 2022 10:19
@GrabowskiM GrabowskiM force-pushed the IBX-3973-disabled-edit-form-fields branch from 4d5a3ec to 7abf88e Compare October 21, 2022 11:35
@GrabowskiM GrabowskiM changed the base branch from main to 4.2 October 21, 2022 11:37
color: $ibexa-color-dark-300;

&::before,
&::after {
Copy link
Contributor

Choose a reason for hiding this comment

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

Before and after do not need content: '' anymore?

Copy link
Contributor

@tischsoic tischsoic Oct 27, 2022

Choose a reason for hiding this comment

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

content: '' was specified in the same file here:


here we only override background-color.


&__map {
z-index: 0;
width: 50%;
height: calculateRem(400px);
border-top-left-radius: $ibexa-border-radius;
border-bottom-left-radius: $ibexa-border-radius;
position: relative;

&--disabled::after {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpitck

Suggested change
&--disabled::after {
&--disabled {
&::after {

@@ -143,7 +143,9 @@
{%- if form.parent is empty -%}
{{ form_errors(form) }}
{%- endif -%}
{{- block('form_rows') -}}
{% with { attr: attr } %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{% with { attr: attr } %}
{% with { attr } %}

{% set attr = attr|merge({'data-max-file-size': max_file_size}) %}
{% set wrapper_attr = wrapper_attr|default({})|merge({'class': (wrapper_attr.class|default('') ~ ' ibexa-field-edit--with-preview')|trim}) %}
{% set preview_attr = preview_attr|default({})|merge({'class': (preview_attr.class|default('') ~ ' ibexa-field-edit__preview')|trim}) %}
{% set widget_wrapper_attr = widget_wrapper_attr|default({})|merge({'class': (widget_wrapper_attr.class|default('') ~ ' ibexa-field-edit__data')|trim}) %}

{% if fieldtype_is_not_translatable or fieldtype.vars.disabled %}
{% set attr = attr|merge({'readonly': 'readonly'}) %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{% set attr = attr|merge({'readonly': 'readonly'}) %}
{% set attr = attr|merge({ readonly: 'readonly' }) %}

@@ -37,21 +40,27 @@
<label class="ibexa-label form-label">{{ 'ezauthor.Email'|trans|desc('Email') }}</label>
</div>
{% for child in form.authors %}
{{ form_row(child) }}
{{ form_row(child, { attr: { readonly: readonly}}) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{ form_row(child, { attr: { readonly: readonly}}) }}
{{ form_row(child, { attr: { readonly }}) }}

@katarzynazawada
Copy link
Contributor

Form field is still not greyed out
Screenshot 2022-11-10 at 11 16 43

@GrabowskiM GrabowskiM force-pushed the IBX-3973-disabled-edit-form-fields branch from 7abf88e to 0301a7b Compare November 16, 2022 13:11
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
2.9% 2.9% Duplication

@katarzynazawada
Copy link
Contributor

Form field will be fixed as follow-up

@dew326 dew326 merged commit 3465c86 into 4.2 Nov 18, 2022
@dew326 dew326 deleted the IBX-3973-disabled-edit-form-fields branch November 18, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants