Skip to content

[WIP] Introducing SyliusUiBundle and reworked backend#1488

Closed
pjedrzejewski wants to merge 8 commits intoSylius:masterfrom
pjedrzejewski:sylius-ui-poc
Closed

[WIP] Introducing SyliusUiBundle and reworked backend#1488
pjedrzejewski wants to merge 8 commits intoSylius:masterfrom
pjedrzejewski:sylius-ui-poc

Conversation

@pjedrzejewski
Copy link
Copy Markdown
Contributor

Q A
Bug fix? yes
New feature? yes
BC breaks? yes
Fixed tickets #627 and few others!
License MIT
Doc PR -

Ok, this is a bit big one, but I think it is worth it! Initially I wanted to split it into few separate PRs, but these are mostly template changes and assets handling. I recommend looking through branch view on github to see all changes - https://github.com/pjedrzejewski/Sylius/tree/sylius-ui-poc.

CHANGES:

  • This PR adds BowerPHP for managing the frontend dependencies. This php library is mostly compatible with the nodejs version and allows us to remove the libs commited into repository. Please note, I have not removed the assets yet, to avoid huge and unreviewable changeset.
  • It also replaces our css styles for the backend with LESS files. They need to be cleaned up and adjusted, in large part I just separated the main big css file.
  • All components, layouts and elements which build the backend and only the backend are moved to new SyliusUiBundle.
  • All repeatable elements are moved to macros, like page headers, history tables and so on. No more duplication here and it is easy to modify all headers across backend, without the need to override it.
  • Big templates have been separated into several smaller ones.
  • Generally, organization of templates is cleaner and easier to override. (theming on its way)

Why?

  1. The raw interface can be used outside of Sylius. Please keep in mind it is very basic now, but as we work on new features and improve the UX in general, we'll have more and more elements, which are repeatable in many apps, also these non-Sylius powered.
  2. The layouts, assets, js libraries and elements can be used in bundle's default templates. Right now SyliusResourceBundle in clunked with all this stuff.
  3. SyliusUiBundle contains base MenuBuilder, Security and Form controllers.

TODO:
-25px

  • Clean up the LESS files.
  • Adjust features to button / little UI changes.
  • Make the sidebar full-width.
  • Finish the order page.
  • Remove the extra fields in product form. (rendered by form_end)
  • Merge and adapt my collection-fix branch.
  • Fix the styles of backend login page.

BACKEND UI CHANGES:

I've made few tweaks to how backend looks, hopefully you'll like it.

  • Global sidebar has been replaced by contextual one. Having sidebar with all options visible all the time is waste of space. Especially when we have so many menu nodes, half of them is invisible on small screens.
  • The main sidebar was moved to top horizontal navbar with dropdown menus on hover. I restructured the menu a bit, now it contains Products, Sales, Marketing, Customers, Content and Configuration nodes.
  • The sidebar on the left appears on pages where it is useful, currently on Product, Order and User pages.
  • The form action buttons were moved to the top right, inside the page header.
  • Replaced the enabled/disabled & yes/no labels with nicer alternatives.
  • Other various minor changes.

See images yourself! I need merge another branch where I have fixed and improved all js collection stuff etc. - I will deploy this branch to demo page, so that you can see all the changes live.

sylius meta title default - google chrome_025
sylius meta title default - google chrome_024
sylius meta title default - google chrome_023
sylius meta title default - google chrome_022
sylius meta title default - google chrome_021
sylius meta title default - google chrome_020
sylius meta title default - google chrome_019
sylius meta title default - google chrome_018
sylius meta title default - google chrome_017
sylius meta title default - google chrome_016

@arnolanglade
Copy link
Copy Markdown
Contributor

👍 for the UIbundle

You should move the title of the page (and the action buttons) above the the breadcrumb and put it in the the page. The main menu and the sub menu (title and actions button) should fixed. Like that we can scroll at the end of the page (a form for example) and still save it.

@pjedrzejewski
Copy link
Copy Markdown
Contributor Author

@Arn0d Why above the breadcrumb? I'm not sure I understand "put it in the page".

Regarding the main menu and submenu - yeah, I was thinking about it - good idea!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we move it in the ResourceController and tweak it a little bit for being it more generic ?

@arnolanglade
Copy link
Copy Markdown
Contributor

@pjedrzejewski : I thought at something like that :
sylius

@kayue
Copy link
Copy Markdown
Contributor

kayue commented May 12, 2014

+1 on using LESS.

BTW can we use sub-nav bar instead of dropdown for 2nd nav?

screen shot 2014-05-12 at 10 03 25 am

@winzou
Copy link
Copy Markdown
Contributor

winzou commented May 14, 2014

This is huge PR!
A bit hard to review but seems nice. Can you ping when you push it on demo.sylius.org?

@arnolanglade
Copy link
Copy Markdown
Contributor

@pjedrzejewski : where is your collection-fix ?

@arnolanglade
Copy link
Copy Markdown
Contributor

@pjedrzejewski What is the status of this ?

@pjedrzejewski
Copy link
Copy Markdown
Contributor Author

@Arn0d Hope to have this finished this week, then we'll get more speed, cause I am waiting with merging some of the PR's to get this in master.

@arnolanglade
Copy link
Copy Markdown
Contributor

Which PR are you talking about ? Can I have a look on your collection-fix branch ?

@antonydb
Copy link
Copy Markdown

Can I request that elements like the .page-header be moved into a separate twig block inside a base template (e.g. Have an empty {% block page_header %}{% endblock %} inside UiBundle::layout.html.twig )? If you ever wanted to move the .page-header you'd have to edit a lot of templates otherwise.

@arnolanglade
Copy link
Copy Markdown
Contributor

@pjedrzejewski What is the status on this PR ?

@pjedrzejewski
Copy link
Copy Markdown
Contributor Author

@Arn0d To be honest I've made it too big and got stuck... I am thinking about taking just the good parts of it and giving a shot to https://github.com/Ehesp/Responsive-Dashboard (MIT License)... That would be awesome! What do you think?

@stloyd
Copy link
Copy Markdown
Contributor

stloyd commented Aug 7, 2014

@pjedrzejewski That's why I mostly do my PRs as small steps =) (i.e. that domain managers PoC)

IMO you should list here what is missing, what is exactly done, so anyone can help you with this and speed up it.

TBH. I don't think we should introduce that "dashboard" code in this PR, it will make it even bigger and harder to finish, I think that we should handle only started stuff, and later create RFC or PR that introduces next change like that dashboard.

@kayue
Copy link
Copy Markdown
Contributor

kayue commented Aug 7, 2014

@pjedrzejewski Are we abandoning this PR?

If you can break this PR into smaller steps, I think I can contribute the frontend part.

  1. Move all backend code to SyliusUiBundle.
  2. Setup BowerPHP to handle JS dependency.
  3. Rework the backend layout and styling in LESS.

PS: I think SyliusBackofficeBundle is a better name than SyliusUiBundle.

@pjedrzejewski
Copy link
Copy Markdown
Contributor Author

@kayue The idea behind this SyliusUiBundle is that it can be used outside of Sylius and even core. I will sit down today and analyze how can we break up this huge crap into smaller ones. :/

@kayue
Copy link
Copy Markdown
Contributor

kayue commented Aug 8, 2014

@pjedrzejewski So the UI bundle will be a frontend UI components bundle, am I correct?

Is this similar to Telerik's Kendo UI PHP library http://demos.telerik.com/php-ui/line-charts/index

@arnolanglade arnolanglade added this to the v0.11.0 milestone Aug 30, 2014
@arnolanglade
Copy link
Copy Markdown
Contributor

@pjedrzejewski I can split #627 into small PR if you want !

@pjedrzejewski
Copy link
Copy Markdown
Contributor Author

I hate myself for this PR. :/ I will split it into smaller bits later, backend UI is not that important. I will move this further in the roadmap and complete other stuff I have started. :S

@arnolanglade
Copy link
Copy Markdown
Contributor

@pjedrzejewski CMF integration / API ???

@madc
Copy link
Copy Markdown

madc commented Oct 8, 2014

It's a shame. I really liked the horizontal menu.

@adamelso
Copy link
Copy Markdown
Contributor

adamelso commented Feb 4, 2015

Too bad this wasn't merged, it was quite a sexy-looking UI.

@pjedrzejewski Do we have an RFC for UiBundle? I am working on two proof-of-concepts that are related, it would be great if there was one place where thoughts regarding the UI codebase could be collected.

@pjedrzejewski
Copy link
Copy Markdown
Contributor Author

I hope to give a shot soon. I have actually started playing with adding Sylius look to http://rdash.github.io/#/ And it looks quite cool. (without angular, jquery version)

I think I will find some time to describe my ideas and we can discuss it again if you are interested. I will ping you in appropriate issue. :)

@madc
Copy link
Copy Markdown

madc commented Feb 4, 2015

You could ping me too, if you want. Would like to contribute to this.

@songecko
Copy link
Copy Markdown

songecko commented Oct 9, 2015

Hi @pjedrzejewski , please you should consider this option: https://almsaeedstudio.com/preview. See the differentes options of that template. Im using this on my sylius projects like a replacement of the current desing.

@nakashu
Copy link
Copy Markdown
Contributor

nakashu commented Oct 9, 2015

@songecko, @pjedrzejewski I also recommend adminLTE

@pjedrzejewski
Copy link
Copy Markdown
Contributor Author

Wow, I see that AdminLTE is MIT licensed, which is a nice surprise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants