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

Introducing Themability & Vuetify #319

Merged
merged 7 commits into from Nov 14, 2018
Merged

Introducing Themability & Vuetify #319

merged 7 commits into from Nov 14, 2018

Conversation

scramb
Copy link
Contributor

@scramb scramb commented Nov 12, 2018

Description

Introduced themability with vuetify and built example loginPage. Theme will be selected as before from config.json by name. themeName.json in phoenix/themes folder will be loaded to vuex store to make it accesible by every component.
Material-Icons and Vuetify get bundled with the inline styles by webpack to one core.css file.

Related Issue

Motivation and Context

This PR could resolve all in #1 requested features and will help us to build a straight forward themeable design.

How Has This Been Tested?

  • developmentMode:
    • yarn run watch fe.serv3r.cloud:8300 on localhost connected against ownCloud X running on a dedicated machine.
    • changed colors from ownCloud blue to yellow and back
  • dist-output:
    • dist output run with python as web-server connected against same ownCloud X
    • changed colors from ownCloud blue to yellow and back

Screenshots:

2018-11-14-104652_1712x1006_scrot
2018-11-14-104549_1710x1007_scrot

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@scramb scramb requested a review from DeepDiver1975 November 12, 2018 15:56
@DeepDiver1975
Copy link
Member

Theming works really nice

screenshot from 2018-11-13 17-00-56

@PVince81
Copy link
Contributor

@scramb mind reformatting the PR description ?

The PR subject should be a text that could be included as is in a changelog.

The first post of the PR should explain what the PR is about, and can include "fixes XYZ", etc.

From reading the code it seems to load the theme JSON but not sure what it does with it and why it works. A summary would be nice. Thanks!

@DeepDiver1975 introduce PR template ?

@scramb scramb changed the title closes #228, closes #127, refs #1 - theming improvements & cleanup Introducing Themability & Vuetify Nov 13, 2018
@DeepDiver1975
Copy link
Member

@DeepDiver1975 introduce PR template ?

👍

@scramb
Copy link
Contributor Author

scramb commented Nov 13, 2018

@scramb mind reformatting the PR description ?

The PR subject should be a text that could be included as is in a changelog.

The first post of the PR should explain what the PR is about, and can include "fixes XYZ", etc.

From reading the code it seems to load the theme JSON but not sure what it does with it and why it works. A summary would be nice. Thanks!

@DeepDiver1975 introduce PR template ?

I adjusted title and description of the PR

@DeepDiver1975
Copy link
Member

github templates are here #322

@PVince81
Copy link
Contributor

PVince81 commented Nov 14, 2018

Will it work with separate apps ? Does the theme need to be recompiled for every app or can it be used directly ?

:src="configuration.theme.logo.big"
width="50%"
:aspect-ratio="1.96">
<v-flex class="theme--light grey lighten-2 pa-5 ma-3 center-dialog" xs4>
Copy link
Contributor

Choose a reason for hiding this comment

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

"pa-5" and "ma-3" are these hard-coded values ?

what if we want to change the theme to have a different padding for these kind of components ?
might make more sense to have something like "pa-small", "pa-medium", "pa-large"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://vuetifyjs.com/en/layout/spacing - this are the spacing helpers - they can be used like {property}{direction}-{size}

Copy link
Contributor

Choose a reason for hiding this comment

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

As I understand, in some cases one needs to use spacing helpers on top of existing predefined padding/margin defaults. But here I'm surprised that we have to use it that often.

So spacings are not defined as part of components ? Does v-btn have default paddings as part of the theme or do I need to explicitly set them every time I define a button ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

v-btn got a default spacing which can be used.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok cool, so there are defaults.

should we rather adjust "pa-2" to be the default on "h2", "v-flex" and "v-btn" in the components below to avoid having to repeat it that often ?

my concern is mostly about having a too high reliance on such classes instead of having sensible defaults

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could set this globally and override if needed i adjusted this

Copy link
Member

Choose a reason for hiding this comment

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

I guess we will see cleaner classes as soon as the whole code base is migrated and uikit is not spitting in classes anymore ....

Copy link
Contributor

Choose a reason for hiding this comment

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

as far as I understand, UIkit should not interfere with existing elements as it's "opt-in", you need to explicitly set the classes. So I don't think it''s a side effect.

You guys have decided to go with "pa-2" for whatever reason, maybe it was visually fitting. If possible it would be good to bring this to the default as soon as possible as I'm afraid that the markup becomes unmaintainable if we start adding such exceptions everywhere.

I'm fine merging this PR first then please address this as next task.

@scramb
Copy link
Contributor Author

scramb commented Nov 14, 2018

Will it work with separate apps ? Does the theme need to be recompiled for every app or can it be used directly ?

The theme is injected into vue instance and can be used from the apps aswell. Since we're loading the config from vuex we don't need to recompile

@DeepDiver1975 DeepDiver1975 merged commit 6b8012e into owncloud:master Nov 14, 2018
@tempelgogo tempelgogo deleted the feature/vuetify-rebased branch December 13, 2018 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't load anything from the Internet
3 participants