Skip to content

Redesign: Install tailwind#9274

Merged
ahukkanen merged 24 commits intofeature/redesignfrom
feature/redesign-tailwind
Jun 9, 2022
Merged

Redesign: Install tailwind#9274
ahukkanen merged 24 commits intofeature/redesignfrom
feature/redesign-tailwind

Conversation

@Crashillo
Copy link
Copy Markdown
Contributor

@Crashillo Crashillo commented May 9, 2022

🎩 What? Why?

This PR takes care of installing Tailwind, and as a side effect it fixes the PostCSS installation, which seems to be broken in development branch.

So this PR should be reviewed in the following order:

  • PostCSS fixes:
    • the PostCSS config file is fixed
    • a couple of CSS files imported from node_modules have been moved to a JS import, because otherwise PostCSS won't compile them
  • Tailwind installation, as a PostCSS plugin
    • dynamic generation of the content property of Tailwind configuration, which needs to include all the folders which can include CSS classes that need to be reviewed by Tailwind. We had some issues solving this, because any combination of decidim-* or brackets like decidim-{core,accountability...} caused an infinite loop

📌 Related Issues

@entantoencuanto entantoencuanto force-pushed the feature/redesign branch 3 times, most recently from 1f91262 to b0c45d3 Compare May 17, 2022 17:17
@entantoencuanto entantoencuanto force-pushed the feature/redesign-tailwind branch from 5aee665 to 0b6b194 Compare May 19, 2022 11:08
@ferblape ferblape force-pushed the feature/redesign branch from 70381a6 to 94e04d5 Compare May 23, 2022 01:53
@ferblape ferblape force-pushed the feature/redesign-tailwind branch from dbc6a56 to 580e651 Compare May 23, 2022 10:20
@ferblape ferblape force-pushed the feature/redesign branch from 94e04d5 to 2b0e23a Compare May 27, 2022 07:30
@ferblape ferblape force-pushed the feature/redesign-tailwind branch from 0aa4eda to d93d829 Compare May 27, 2022 07:30
@Crashillo Crashillo changed the title Install tailwind Redesign: Install tailwind Jun 6, 2022
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

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

This seems fine for me and I also tested this locally, it worked fine when enabling the redesign and applying some Tailwind classes on the home page, worked fine.

One thing I noticed regarding the extra package-lock.json, could you remove that please? See below.

@ferblape ferblape force-pushed the feature/redesign branch from 2b0e23a to bb3cb75 Compare June 9, 2022 06:05
@ferblape ferblape force-pushed the feature/redesign-tailwind branch from 9c65dbe to ec9d754 Compare June 9, 2022 06:08
@ahukkanen ahukkanen merged commit b62877f into feature/redesign Jun 9, 2022
@ahukkanen ahukkanen deleted the feature/redesign-tailwind branch June 9, 2022 08:44
ferblape added a commit that referenced this pull request Jun 13, 2022
* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>
entantoencuanto added a commit that referenced this pull request Jun 14, 2022
* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>
entantoencuanto added a commit that referenced this pull request Jun 15, 2022
* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>
entantoencuanto added a commit that referenced this pull request Jun 17, 2022
* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>
entantoencuanto added a commit that referenced this pull request Jun 17, 2022
* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>
entantoencuanto added a commit that referenced this pull request Jun 20, 2022
* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>
@andreslucena andreslucena added project: redesign Barcelona City Council contract and removed contract: lot: px labels Jun 21, 2022
entantoencuanto added a commit that referenced this pull request Jun 29, 2022
* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>
ahukkanen pushed a commit that referenced this pull request Jul 7, 2022
…9229)

* Add RedesignLayout concern

* Include redesign layout in some controllers

* Improve RedesignLayout concern

* Add new entrypoint for redesigned decidim_core and use it in dedesigned layout

* Enable redesign in homepage controller

* Add task to create redesigned entrypoints

* Test redesigned scss partial

* Test imports of redesigned scss from js entrypoints

* Create a redesigned_app group and a specific method to import scss partials

* Add task to create redesigned entrypoints

* Create a redesigned_app group and a specific method to import scss partials

* Improve redesign_entrypoint task to register also scss partials

* Redesigned layotu calls redesign CSS packs

* Allow cells to use redesigned versions if redesign is enabled in controller and redesigned cell exists

* Test redesigned cells in meetings author

* Add some redesign helper methods

* Delegate some redesign methods on controller on cells

* Add some redesign helper methods

* include redesign concern in admin controllers with feature disabled

* Add redesign layout to devise controllers concern

* Disable redesign in all controllers

* Disable redesign explicitly in assemblies controller to avoid redesign_participatory_space_layout default behavior

* Fix tests

* Define a redesign_active Decidim setting and take its value from an environment variable

* Remove duplicated line

* Use redesign_active initializer setting in redesign concern and use a class variable

With a class variable the setting can be inherited by controllers and
ovewritten if required with a redesign active: true/false

* Remove no longer required redesign_defined? method

* Revert redesign in assemblies participatory space

* Don't disable redesign in main application controller

* Remove testing text

* Revert redesign in meetings stylesheets assets

* Disable rubocop Style/ClassVars in redesign layout

* Move javascript to footer

* Load redesigned app styles in redesigned stylesheet

* Redesign: Install tailwind (#9274)

* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>

* Revert definition of @@enable_redesign class variable and use an instance variable

* Enable redesign by default

* Fix redesigned cell name detection

* Redesign: main layout, header & footer (#9340)

* [skip ci] testing commit

* testing files

* clean files to run tailwind

* remove the package-locks references

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Fix import order

* Load node_modules styles with JS

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* clean files to run tailwind

* typography

* add colors & update typography

* add new icons support

* header desktop-mobile & css toggler

* easier legacy css toggler

* footer response new desgins

* a11y issues

* refactor external link js

* tailwind config in ERB & fix external_link position

* add fonts in new design

* buttons component

* [skip ci] button hover

* first dropdown

* position dropdown

* sort files into more descriptive folders

* second dropdown

* [skip ci] second dropdown tablet/mobile

* [skip ci] rearrage files

* fix header links variants (desktop/mobile)

* [skip ci] overlaps among dropdowns

* [skip ci] tailwind dropdown component

* [skip ci] restore files

* most accurate naming

* Import ExternalLink from redesigned version

* Update selector in tests

* Fix external_link test

* Remove package-lock from packages

* Remove duplicated tailwind config

* Enable redesign for main layout

* Fix some tests related with icons

* Fix some elections tests related with icons

* Recover yield in redesigned wrapper

* Recover detection of redesign in icon method

* Define redesign_enabled? on menu_helper test

* Revert "Fix some elections tests related with icons"

This reverts commit 09de3dc.

* Fix tests to take into account redesign_enabled?

* Fix tests to take into account redesign_enabled?

* fix stylelint

* fix erblint

* Disable completely redesign in admin section

* fix footer glitches

* enhacement decidim paginate

* pagination

* results per page & some generalizations turn into specifications

* fix pagination

* two-columns layout

* one column layout + decorator

* button should be an inline element

* update the real tailwind config file

* replace status with colors (to match tailwind classes)

* label component

* fix gray colors tailwind

* fix footer color (unique)

* Fix translation

* fix stylelint

* Hide results_per_page if there is only one page

* Hide pagination if there is only one page

* Add some identifiers to pagination elements

* Fix pagination shared examples

* new tailwind color setup

* update classes accordingly new setup

* replace old css classes

* Remove unused translations

* Increase default per page in pagination on some tests with filters

* Fix some pagination tests

* Fix default per_page test

* Include LayoutHelper in some cells using icon

* Fix pagination tests

* Fix cell test

* Fix pagination test

* fix erblint

* fix stylelint

* fix a11y

* fix bug on existing avatar

* Add admin dashboard link to main links dropdown

* Add URLs to main links in header

* Fix path

* Fix dropdown

* add layout

* responsive layout

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>

* Replace TODOs

* fix center layout fallback only children

* Fix test providing redesign_enabled? method

* alter tailwind setup

* typo

* common forms styling

* fix lint offenses

* Fix links in redesigned_main_links_dropdown

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
…ecidim#9229)

* Add RedesignLayout concern

* Include redesign layout in some controllers

* Improve RedesignLayout concern

* Add new entrypoint for redesigned decidim_core and use it in dedesigned layout

* Enable redesign in homepage controller

* Add task to create redesigned entrypoints

* Test redesigned scss partial

* Test imports of redesigned scss from js entrypoints

* Create a redesigned_app group and a specific method to import scss partials

* Add task to create redesigned entrypoints

* Create a redesigned_app group and a specific method to import scss partials

* Improve redesign_entrypoint task to register also scss partials

* Redesigned layotu calls redesign CSS packs

* Allow cells to use redesigned versions if redesign is enabled in controller and redesigned cell exists

* Test redesigned cells in meetings author

* Add some redesign helper methods

* Delegate some redesign methods on controller on cells

* Add some redesign helper methods

* include redesign concern in admin controllers with feature disabled

* Add redesign layout to devise controllers concern

* Disable redesign in all controllers

* Disable redesign explicitly in assemblies controller to avoid redesign_participatory_space_layout default behavior

* Fix tests

* Define a redesign_active Decidim setting and take its value from an environment variable

* Remove duplicated line

* Use redesign_active initializer setting in redesign concern and use a class variable

With a class variable the setting can be inherited by controllers and
ovewritten if required with a redesign active: true/false

* Remove no longer required redesign_defined? method

* Revert redesign in assemblies participatory space

* Don't disable redesign in main application controller

* Remove testing text

* Revert redesign in meetings stylesheets assets

* Disable rubocop Style/ClassVars in redesign layout

* Move javascript to footer

* Load redesigned app styles in redesigned stylesheet

* Redesign: Install tailwind (decidim#9274)

* [skip ci] testing commit

* testing files

* Copy tailwind configuration

* clean files to run tailwind

* remove the package-locks references

* restore default import to override

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Update package-lock

* Fix quotes

* Update package-lock design app

* Update plugin order

* Simplify plugins

* Fix import order

* Define paths that don't include packs/ folder to prevent infinite loops

* Revert "Simplify plugins"

This reverts commit 1d53c00.

* Load node_modules styles with JS

* JS offense

* CSS offense

* Detailed configuration

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* Add clarification

* Remove package-lock file

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>

* Revert definition of @@enable_redesign class variable and use an instance variable

* Enable redesign by default

* Fix redesigned cell name detection

* Redesign: main layout, header & footer (decidim#9340)

* [skip ci] testing commit

* testing files

* clean files to run tailwind

* remove the package-locks references

* Fix decidim gem path in tailwind configuration

* testing files

* Remove not required file

* Fix import order

* Load node_modules styles with JS

* Use explicit list of paths

Avoid using the star in the paths to prevent infinite loops

* clean files to run tailwind

* typography

* add colors & update typography

* add new icons support

* header desktop-mobile & css toggler

* easier legacy css toggler

* footer response new desgins

* a11y issues

* refactor external link js

* tailwind config in ERB & fix external_link position

* add fonts in new design

* buttons component

* [skip ci] button hover

* first dropdown

* position dropdown

* sort files into more descriptive folders

* second dropdown

* [skip ci] second dropdown tablet/mobile

* [skip ci] rearrage files

* fix header links variants (desktop/mobile)

* [skip ci] overlaps among dropdowns

* [skip ci] tailwind dropdown component

* [skip ci] restore files

* most accurate naming

* Import ExternalLink from redesigned version

* Update selector in tests

* Fix external_link test

* Remove package-lock from packages

* Remove duplicated tailwind config

* Enable redesign for main layout

* Fix some tests related with icons

* Fix some elections tests related with icons

* Recover yield in redesigned wrapper

* Recover detection of redesign in icon method

* Define redesign_enabled? on menu_helper test

* Revert "Fix some elections tests related with icons"

This reverts commit 09de3dc.

* Fix tests to take into account redesign_enabled?

* Fix tests to take into account redesign_enabled?

* fix stylelint

* fix erblint

* Disable completely redesign in admin section

* fix footer glitches

* enhacement decidim paginate

* pagination

* results per page & some generalizations turn into specifications

* fix pagination

* two-columns layout

* one column layout + decorator

* button should be an inline element

* update the real tailwind config file

* replace status with colors (to match tailwind classes)

* label component

* fix gray colors tailwind

* fix footer color (unique)

* Fix translation

* fix stylelint

* Hide results_per_page if there is only one page

* Hide pagination if there is only one page

* Add some identifiers to pagination elements

* Fix pagination shared examples

* new tailwind color setup

* update classes accordingly new setup

* replace old css classes

* Remove unused translations

* Increase default per page in pagination on some tests with filters

* Fix some pagination tests

* Fix default per_page test

* Include LayoutHelper in some cells using icon

* Fix pagination tests

* Fix cell test

* Fix pagination test

* fix erblint

* fix stylelint

* fix a11y

* fix bug on existing avatar

* Add admin dashboard link to main links dropdown

* Add URLs to main links in header

* Fix path

* Fix dropdown

* add layout

* responsive layout

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Fernando Blat <fernando@blat.es>

* Replace TODOs

* fix center layout fallback only children

* Fix test providing redesign_enabled? method

* alter tailwind setup

* typo

* common forms styling

* fix lint offenses

* Fix links in redesigned_main_links_dropdown

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project: redesign Barcelona City Council contract

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants