Adapt_framework: Move core dependencies out of theme and into core

Created on 19 Sep 2017  ·  7Comments  ·  Source: adaptlearning/adapt_framework

Fresh issue to progress towards separating the theme/plugin from the core.
At the moment they are too interlinked and rely on each other heavily, to the point that it doesnt build in the absence of certain variables (LESS) or templates (hbs) found within the theme.

The framework should build without a theme.

The initial approach is to move required code/files from Vanilla theme to the core (framework).
This should enable the framework to successfully build without any dependencies.

Plugins should work standalone which is a future step.

I have tracked down some of the other issues raised which mention some bits and pieces on this issue:
adaptlearning/adapt_framework#835
adaptlearning/adapt_framework#953

With this one being the only one with some work done on it, but seems to have went sour now, hence the reason for creating this fresh issue to resolve the issue (or the first step towards it):
adaptlearning/adapt_framework#1189

enhancement

All 7 comments

Update

I have currently got everything pulled out of the vanilla theme and merged into the core.
There is still a lot of tidying up to do but all of the stuff is merged in.

The below is an extract taken from here https://github.com/adaptlearning/adapt_framework/issues/1189#issuecomment-238582810

I am working through the bits found from here to get this to completion of Step 1.

Suggested new structure

[ ] browser (core/less/) – DOM setup
    [ ] browser.less (core/reset.less, core/base.less, theme/src/fonts.less)
        [ ] all tag styles (except body font declaration)
        [ ] all browser fixes (except icon fix)
[x] variables (core/less/variables/) – all global variables
    [x] border.less (theme/generic.less)
        [x] all order and outline declarations
    [x] colours.less (theme/colors.less)
        [x] remove all color declarations (@white, @blue, etc) – unnecessary abstraction
    [x] devices.less (theme/generic)
        [x] widths
    [x] fonts.less (theme/fonts.less)
        [x] font variables
    [x] paddings.less (theme/paddings.less)
        [x] as is
    [x] compatibility.less (theme/src/adapt-defaults.less)
        [x] all redundant variable declarations
[ ] structure (core/less/structure/) – adapt content structure and styling
    [x] article.less (theme/src/article.less)
        [ ] remove responsiveness queries?
    [x] block.less (theme/src/article.less)
        [ ] remove responsiveness queries?
    [x] component.less (theme/src/component.less, core/base.less)
        [ ] remove responsiveness queries?
        [x] combine all component styling
    [x] page.less (theme/src/article.less)
        [ ] remove responsiveness queries?
    [x] responsive.less (theme/src/adapt-defaults.less)
        [x] responsive mixins
    [x] wrapper.less (theme/src/wrapper.less, core/base.less)
        [x] combine all wrapper styling
[x] common (core/less/common/) – common UI structure and styling
    [x] accessibility.less (core/base.less)
        [x] move all accessibility less here
    [x] buttons.less (theme/src/buttons.less
        [x] take style for DOM buttons
    [x] focus.less (theme/src/focus.less)
        [x] as is
    [x] fonts.less (theme/src/fonts.less)
        [x] body font declaration
    [x] icons.less (core/reset.less, theme/src/icons.less)
        [x] combine all icon styles
    [x] shadow.less (theme/src/shadow.less)
        [x] as is
    [x] utility.less (core/base.less)
        [x] visibility-hidden, display-none, no-select
[x] modules (core/less/modules/) – core modules styling and structure
    [x] buttons.less (core/buttons.ess)
        [x] take style for question component buttons
    [x] drawer.less (core/base.less, theme/src/drawer.less)
        [x] merge all styles
    [x] loading.less (core/base.less, theme/src/loading.less)
        [x] merge all styles
    [x] navigation.less (core/base.less, theme/src/navigation.less)
        [x] merge all styles
    [x] notify.less (core/base.less, theme/src/notify.less)
        [x] merge all styles

Have added a few things in from here https://github.com/VYASSYS/adapt_framework/commit/3b4c14723c2a689f21a189232dc8a7d04a48769b?diff=unified

Most of the above is directly related to the previous comment, but just wanted to credit the previous attempts contributors.

@oliverfoster could you check over the changes thus far please https://github.com/nilslp/adapt_framework/commits/issue/1804

There are @TODO Theme migration still to be sorted through but most of the other stuff has been sorted through.

@ciaranlp if you get a chance at some stage could you give this a bit of a test with some themes/plugin combos please?

@nilslp Yes, I will do, great progress!!

@nilslp I can in the middle of next week, can you bug me on Tuesday / Wednesday?

Hi @oliverfoster forgot to bug you. Can I bug you now? ☝️

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sarveshwar-gavhane picture sarveshwar-gavhane  ·  5Comments

joe-replin picture joe-replin  ·  5Comments

danielstorey picture danielstorey  ·  3Comments

chris-steele picture chris-steele  ·  4Comments

sarveshwar-gavhane picture sarveshwar-gavhane  ·  3Comments