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

UI fixes for admin locale select #2684

Merged
merged 4 commits into from
Apr 9, 2018

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Apr 6, 2018

Now that we have a admin local select and store owners can configure available locales for their stores we should improve the UI/UX a little bit.

  1. Admins should only be able to choose from configured available locales instead of all locales in the system



  2. The store administration form uses two columns to display all the fields.

  3. The locale select uses select2, because it is a multi select and this is where select2 still shines.


  4. When the local select is displayed alone, as on the login screen, it has correct margins.

Screenshot

sample store - stores 2018-04-07 01-04-12

tvdeyen added 2 commits April 7, 2018 00:34
If the admin locale select is displayed alone (ie. on the login screen) it has no bottom margin. By keeping the bottom margin and convert the admin user menu from paddings to margins we take advantage of collapsing margins. Both displayed alone have their full margin and when displayed together the margin collapses.
The store available locales select is a multi select. This is where
select2 is still beneficial.
@tvdeyen tvdeyen mentioned this pull request Apr 6, 2018
4 tasks
@@ -1,7 +1,7 @@
<% available_locales = Spree.i18n_available_locales %>
<% available_locales = current_store.available_locales %>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the current_store.available_locales should apply to the frontend only

Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally we would have two configurations, but this seems overkill to me. We could keep it as is, if we encourage the users of solidus_i18n to copy over only the files they need in their app (what I recommend anyway).

Copy link
Member Author

Choose a reason for hiding this comment

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

Reverted

@tvdeyen tvdeyen requested a review from jhawthorn April 6, 2018 22:56
@tvdeyen tvdeyen added the changelog:solidus_backend Changes to the solidus_backend gem label Apr 6, 2018
@tvdeyen
Copy link
Member Author

tvdeyen commented Apr 6, 2018

We should be more descriptive then

monosnap 2018-04-07 01-13-06

tvdeyen added 2 commits April 7, 2018 01:15
We have lots of fields on the store administration form. Let's use the plenty space we have to disaply them nicely.

Also converts the meta description field into textarea and use a custom Bootstrap select for the default currency.
To be very clear about what this actually does we add a field hint to the store admin form.
@tvdeyen tvdeyen force-pushed the admin-locale-selection-fixes branch from f1003a0 to d512e53 Compare April 6, 2018 23:16
@jhawthorn jhawthorn merged commit 812915f into solidusio:master Apr 9, 2018
@tvdeyen tvdeyen deleted the admin-locale-selection-fixes branch April 10, 2018 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_backend Changes to the solidus_backend gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants