Problem/Motivation

The current solution for the Image style edit page isn't using elements integrated on the new Design System.

Proposed resolution

Implement the new designs.

Specs on Figma: https://www.figma.com/file/NpZUAp8BEkMJvm5gKBCDBB/Claro?node-id=16914%3A...

Notes: The machine name +input pattern shouldn't be changed for now because it's going to go through a redesign itself.

User interface changes

The new design will be implemented

Test Pages

CommentFileSizeAuthor
#58 Снимок экрана 2020-06-15 в 18.50.49.png41.99 KBkostyashupenko
#58 Снимок экрана 2020-06-15 в 18.50.45.png38.23 KBkostyashupenko
#58 Снимок экрана 2020-06-15 в 18.54.00.png28.73 KBkostyashupenko
#58 Снимок экрана 2020-06-15 в 18.53.47.png28.73 KBkostyashupenko
#58 interdiff_52-57.txt19.34 KBkostyashupenko
#58 3072773-57--full.patch81.65 KBkostyashupenko
#58 3072773-57.patch27.42 KBkostyashupenko
#54 selected_9001.png157.73 KBKondratievaS
#52 3072773-52.patch20.65 KBshalinigaur
#52 interdiff-3072773-48-52.txt3.67 KBshalinigaur
#52 rs2.png162.98 KBshalinigaur
#52 rs1.png46.59 KBshalinigaur
#52 sr.png78.1 KBshalinigaur
#49 selected_8988.png340.08 KBKondratievaS
#47 Screen Shot 2020-06-12 at 1.57.47 PM.png602.84 KBkomalk
#45 3072773-45.patch21.1 KBshalinigaur
#45 interdiff-3072773-38-45.txt6.86 KBshalinigaur
#40 After_Mobile.png660.69 KBpriyanka.sahni
#40 After_Desktop_1.png924.19 KBpriyanka.sahni
#38 3072773-38.patch21.3 KBshalinigaur
#38 interdiff-3072773-33-38.txt6.63 KBshalinigaur
#33 after-patch-screen-resolved-comment#18.png235.86 KBshalinigaur
#33 after-patch-mobile-screen.png213.15 KBshalinigaur
#33 interdiff-3072773-27-33.txt2.57 KBshalinigaur
#33 3072773-33.patch18.71 KBshalinigaur
#29 2020-06-08 13-54-07 Screenshot.jpg98.17 KBKondratievaS
#27 after-patch-mobile.png691.51 KBkomalk
#27 Screen Shot 2020-06-08 at 12.39.21 PM.png480.88 KBkomalk
#27 after-patch.png792.33 KBkomalk
#27 before-patch.png471.19 KBkomalk
#27 before-patch-mobile.png178.01 KBkomalk
#27 interdiff_16-27.txt1.83 KBkomalk
#27 3072773-27.patch16.12 KBkomalk
#25 edge2.png77.51 KBckrina
#25 edge1.png70.64 KBckrina
#25 Claro - Image Style - mobile.png170.1 KBckrina
#18 selected_8875.png571.84 KBKondratievaS
#16 interdiff_13-16.txt6.55 KBpradeepjha
#16 3072773-16.patch15.47 KBpradeepjha
#13 3072773-13.patch15.23 KBkostyashupenko
#13 Снимок экрана 2020-05-25 в 18.01.54.png436.01 KBkostyashupenko
#7 Image styles edit page v2.png274 KBckrina
#7 Captura de pantalla feta el 2020-02-25 a les 16.46 1.png118.74 KBckrina

Comments

antonellasev created an issue. See original summary.

ckrina’s picture

Status: Active » Postponed

Postponing this until the design is done.

ckrina’s picture

Postponing this until the design is done.

huzooka’s picture

Project: Claro » Drupal core
Version: 8.x-1.x-dev » 8.9.x-dev
Component: Needs design » Claro theme
ckrina’s picture

Issue tags: +Needs design

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

ckrina’s picture

Issue summary: View changes
Status: Postponed » Active
Issue tags: -Needs issue summary update, -Needs design
StatusFileSize
new118.74 KB
new274 KB

Adding the new designs.

ckrina’s picture

Issue summary: View changes

Ana am I missing any definition on the designs?

ana barcelona’s picture

I think it looks good! Excited to continue working with you!

pradeepjha’s picture

Assigned: Unassigned » pradeepjha
pradeepjha’s picture

Assigned: pradeepjha » Unassigned

I'll be working on it later till now I'm unassigning this ticket.

kostyashupenko’s picture

Assigned: Unassigned » kostyashupenko
kostyashupenko’s picture

Assigned: kostyashupenko » Unassigned
StatusFileSize
new436.01 KB
new15.23 KB

Init patch
Image style page
I didn't manage yarn lint:css and css-variables properly yet, so feel free to continue with it.

ckrina’s picture

pradeepjha’s picture

Assigned: Unassigned » pradeepjha

I'll be working on css lint and if there is something missing in design.

pradeepjha’s picture

Assigned: pradeepjha » Unassigned
Status: Active » Needs review
StatusFileSize
new15.47 KB
new6.55 KB

I've done linting of css file. Now there is no lint issue. Rest everything looks good.

pankaj.singh’s picture

Assigned: Unassigned » pankaj.singh
KondratievaS’s picture

StatusFileSize
new571.84 KB

Tested patch from #16 and result is following:

IS

1. Mobile design is not provided, but i think current result is not really good - block are too small and have different size, maybe better to have these blocks each under other
2. Also, "Image style name" field has too big length and machine name should be placed under this field
3. Effect should be bold
4. Select list and Add button should be bigger with bigger margin between them

KondratievaS’s picture

Status: Needs review » Needs work
pankaj.singh’s picture

Assigned: pankaj.singh » Unassigned
pradeepjha’s picture

Issue tags: +Needs design

+Need design for Mobile view.

sharma.amitt16’s picture

@pradeepjha as you have submitted the last patch, requesting you to work on this.

As suggested by @KondratievaS, I feel it will be good if you will put the block under the other on mobile design. I feel it will make more sense on the mobile view.

Any thoughts?

pradeepjha’s picture

Assigned: Unassigned » pradeepjha
pradeepjha’s picture

Assigned: pradeepjha » Unassigned
ckrina’s picture

Issue summary: View changes
Issue tags: -Needs design
StatusFileSize
new170.1 KB
new70.64 KB
new77.51 KB

Here's the design for the mobile. Basically, one below the other as it is right now:

Also, here are the edge case on where the image is too small and how it should behave (specs here):

komalk’s picture

Assigned: Unassigned » komalk
komalk’s picture

Assigned: komalk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new16.12 KB
new1.83 KB
new178.01 KB
new471.19 KB
new792.33 KB
new480.88 KB
new691.51 KB
KondratievaS’s picture

Assigned: Unassigned » KondratievaS
KondratievaS’s picture

StatusFileSize
new98.17 KB

Tested patch from #29 and as i see for mobile resolutions content is cut - need to use horizontal scroll to see whole content
Aslo, bugs #2,3,4 from comment #18 are not fixed

bug

KondratievaS’s picture

Status: Needs review » Needs work
KondratievaS’s picture

Assigned: KondratievaS » Unassigned
shalinigaur’s picture

Assigned: Unassigned » shalinigaur
shalinigaur’s picture

Status: Needs work » Needs review
StatusFileSize
new18.71 KB
new2.57 KB
new213.15 KB
new235.86 KB

Hi, I have used patch #27 and created new patch #33. Interdiff file interdiff-3072773-27-33.txt file is created as well. Fixed issue for content cut in mobile resolution (refer screenshot after-patch-mobile-screen.png).

Also tried fixing bugs #2,3,4 from comment #18 (refer screenshot after-patch-screen-resolved-comment#18.png).

sc

sc

shalinigaur’s picture

Assigned: shalinigaur » Unassigned
pradeepjha’s picture

Status: Needs review » Needs work

Hi @shalinigaur

As I can see you have made some changes in Claro css component here:

diff --git a/core/themes/claro/css/components/button.css b/core/themes/claro/css/components/button.css
index 8594ae4390..c06718293b 100644
--- a/core/themes/claro/css/components/button.css
+++ b/core/themes/claro/css/components/button.css
@@ -253,3 +253,18 @@ a.button--danger:active {
   -moz-appearance: none;
   appearance: none;
 }
+
+
+/* specific css for image edit button */
+.image-style-new .button--extrasmall {
+  margin: 0.5rem 0.5rem 0.5rem 1rem;
+  padding: 1rem 2rem;
+  font-size: 1rem;
+}
+@media screen and (max-width: 470px) {
+  .image-style-new .button--extrasmall {
+    margin: 0.5rem 0.5rem 0.5rem 0;
+    padding: calc(0.25rem - 1px) calc(0.75rem - 1px);
+    font-size: 0.79rem;
+  }
+}

Please make below changes in your last applied patch:

  1. Read my this comment https://www.drupal.org/project/drupal/issues/3098168#comment-13667256.
  2. Don't override CSS .button--extrasmall better use existing some library class. We have one library class called .button--small, if you use this class then you don't have to add any css. Or add another class to write css if design is not achievable.
  3. Then remove extra blank lines.
  4. Please check this changes for all css changes you have done.
shalinigaur’s picture

Assigned: Unassigned » shalinigaur
Status: Needs work » Needs review
shalinigaur’s picture

Status: Needs review » Needs work
shalinigaur’s picture

Assigned: shalinigaur » Unassigned
Status: Needs work » Needs review
StatusFileSize
new6.63 KB
new21.3 KB

@pradeepjha Please see the updated patch 3072773-38.patch. Checked and made changes as mentioned. I have added a new class and removed the override css.

priyanka.sahni’s picture

Assigned: Unassigned » priyanka.sahni

Working on it

priyanka.sahni’s picture

StatusFileSize
new924.19 KB
new660.69 KB

Verified and tested by applying the patch #38.It looks good to me.Can be moved to RTBC.

Steps to test -
1. Go to the admin site.
2. Go to admin/appearance.
3. Select Claro theme.
4. Go to /admin/config/media/image-styles/manage/large.

After Patch Mobile -
After Patch

After Patch Desktop -
After Patch

priyanka.sahni’s picture

Assigned: priyanka.sahni » Unassigned
bnjmnm’s picture

Status: Needs review » Needs work

Partial review:

  1. +++ b/core/themes/claro/css/components/button.css
    @@ -253,3 +253,23 @@ a.button--danger:active {
    diff --git a/core/themes/claro/css/components/button.pcss.css b/core/themes/claro/css/components/button.pcss.css
    
    diff --git a/core/themes/claro/css/components/button.pcss.css b/core/themes/claro/css/components/button.pcss.css
    index f1f95222bd..0b358dcaa9 100644
    
    index f1f95222bd..0b358dcaa9 100644
    --- a/core/themes/claro/css/components/button.pcss.css
    
    --- a/core/themes/claro/css/components/button.pcss.css
    +++ b/core/themes/claro/css/components/button.pcss.css
    
    +++ b/core/themes/claro/css/components/button.pcss.css
    +++ b/core/themes/claro/css/components/button.pcss.css
    @@ -183,3 +183,21 @@ a.button--danger:active {
    

    The added styles target a specific form, and should be moved to a CSS file dedicated to that form. These styles are not comprehensive enough to be reusable elsewhere, it is largely related to positioning that is unique to the image style form.

  2. +++ b/core/themes/claro/css/components/button.pcss.css
    @@ -183,3 +183,21 @@ a.button--danger:active {
    +.image-style-new .button--mediumstyle {
    +  font-size: 1rem;
    +  padding: .9rem 2rem;
    +  margin: 0.5rem 0.5rem 0.5rem 1rem;
    +}
    

    The padding and font-size styles can be removed. The font size doesn't change anything, and this padding rule provides the incorrect values. If this padding style is removed, the correct values will be inherited by other existing CSS.

    Since this means the only changes are margins, this isn't really applying a medium style anymore - the margins can be acheived using a different selector strategy.

  3. +++ b/core/themes/claro/css/components/button.pcss.css
    @@ -183,3 +183,21 @@ a.button--danger:active {
    +@media screen and (max-width: 470px) {
    +  .image-style-new .button--mediumstyle {
    +    padding: calc(0.25rem - 1px) calc(0.75rem - 1px);
    +    font-size: 0.79rem;
    +    margin: 0.5rem 0.5rem 0.5rem 0rem;
    +  }
    +}
    

    The styles added here are already accomplished with .button--extrasmall. Instead of defining a new variant-like class, it's probably better to add a class like .button--add-image-style, and bring in the relvant styles for .button--extrasmall as CSS variables

  4. +++ b/core/themes/claro/css/components/tabledrag.css
    @@ -288,6 +288,7 @@ body.drag {
    +  font-weight: bold;
    

    This impacts every instance of tabledrag, such as admin/structure/types/manage/article/form-display

    This should instead target the image style form, as other uses of tabledrag do not use bold here.

  5. +++ b/core/themes/claro/templates/image-style-preview.html.twig
    @@ -0,0 +1,95 @@
    + * Default theme implementation to display a preview of an image style.
    

    This is a theme override, not a default implementation.

ckrina’s picture

Issue tags: +D4DBoston
shalinigaur’s picture

Assigned: Unassigned » shalinigaur
shalinigaur’s picture

Status: Needs work » Needs review
StatusFileSize
new6.86 KB
new21.1 KB

@bnjmnm Please find the updated patch, done changes as following:
Point 1. Removed the style and added it in the specific image form css.
Point 2. Font-size and padding is removed but margin is given as it was requirement mentioned to give margin between them in bugs #4 from comment #18.
Point 3. Tried doing it but the style is not working unless we make it specific for image form. Although I have renamed the class name as .button--add-image-style
Point 4. Set the css for specific image form.
Point 5. Corrected the comment

shalinigaur’s picture

Assigned: shalinigaur » Unassigned
komalk’s picture

StatusFileSize
new602.84 KB

@shalinigaur,
Please try to fix the linting errors. Please have a look at the screenshot.

shalinigaur’s picture

StatusFileSize
new19.71 KB
new2.26 KB

@komalkolekar Fixed linting errors. Please find the updated patch.

KondratievaS’s picture

StatusFileSize
new340.08 KB

Tested patch from #45 and there are 3 issues

1. Margin is to big
2. Button and selectlist are displaced for mobile
3. For resolutions more than 470px display is not good

bugs

KondratievaS’s picture

Status: Needs review » Needs work
shalinigaur’s picture

Assigned: Unassigned » shalinigaur
shalinigaur’s picture

Status: Needs work » Needs review
StatusFileSize
new78.1 KB
new46.59 KB
new162.98 KB
new3.67 KB
new20.65 KB

@KondratievaS Please find the updated patch with following changes:

1. Fixed margin (refer screenshot below)

sc

2. Fixed Button and selectlist are displaced for mobile (refer screenshot below)

rs1

3. For resolutions more than 470px display is fixed (refer screenshot below)

rs2

If the issue still exists for any particular browser or screen-size then please let me know.

shalinigaur’s picture

Assigned: shalinigaur » Unassigned
KondratievaS’s picture

StatusFileSize
new157.73 KB

Tested patch from #52 and there are 2 bugs:

- blocks should have same size
- value in select list is cut

bugs

KondratievaS’s picture

Status: Needs review » Needs work
kostyashupenko’s picture

Assigned: Unassigned » kostyashupenko
shalinigaur’s picture

StatusFileSize
new96.14 KB
new130.21 KB
new53.54 KB

@KondratievaS I have re-tested on the same resolution as you tested but everything seems fine to me. I have tested on Chrome and Mozilla browsers please find the screenshots below.

chrome

mozilla

responsive

Please mention the specific browser in which you are testing.

kostyashupenko’s picture

Assigned: kostyashupenko » Unassigned
Status: Needs work » Needs review
StatusFileSize
new27.42 KB
new81.65 KB
new19.34 KB
new28.73 KB
new28.73 KB
new38.23 KB
new41.99 KB

I have removed some weird code from last patch, like:

.image-style-new {
    display: ruby;
  }

or

.image-style-edit-form .js-form-type-textfield {
  display: inline-grid;
}

or

.image-style-edit-form .form-item__label {
    display: unset;
  }

and some other.

Now what was really done:
1. Added some margins / better management of cards sizes for all breakpoints.
2. It was really weird to me why we have --small modifier for buttons, but no same modifier for form-elements :) So i have added it. BUT! I'm sure we can just set selectbox + button as --extrasmall => that one will be fully enough. But for now - i have added --small modifier for form-elements. It needs discussion and careful review. Check how it looks with:
--- --small modifier
Small modifier

--- --small modifier
Extrasmall modifier

So honestly no big difference for me - we can keep extrasmall for both ?

3. I don't really think we have to manage width of that textfield, at least why? I don't see any reason (from that comment)
Only local images are allowed.

4. I have some doubts about mobile styling, check the following screens:
--- with hidden weights column
Hidden weights column

--- with visible weights column
Hidden weights column

Since markup is table - any solutions how we can deal with it?

bnjmnm’s picture

Title: Image style edit page » [PP-1 ]Image style edit page
Status: Needs review » Postponed

It was really weird to me why we have --small modifier for buttons, but no same modifier for form-elements :) So i have added it.

There's an existing issue for that: #3083256: Create smaller variations for form elements. I'm setting this to Postponed on that issue, as some of the changes here could conflict with that. I like what I'm seeing in #58, though, so if we can get the smaller variants issue through, this could be pretty close.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

The Claro theme was approved for removal in #3576460: [policy, no patch] Deprecate and remove Claro.

The deprecation work is in #3576668: [meta] Tasks to deprecate Claro and the removal work in #3584638: [meta] Tasks to remove the Claro theme.

smustgrave’s picture

Project: Drupal core » Claro
Version: main » 3.0.x-dev
Component: Claro theme » Code
Status: Postponed » Needs work