- Issue created by @alex.skrypnyk
- Assigned to alex.skrypnyk
- Status changed to Fixed
9 months ago 7:05pm 12 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.
Description
CivicTheme UIKit is already split in code from the Drupal theme - the code resides in civictheme/civictheme_library.
This ticket is to update the way the UI Kit is included into the Drupal theme.
Acceptance Criteria
AC1 - UIKit code location in the civictheme directory
Given I am a developer on the consumer site
When I download the civictheme (via composer or ZIP-file from Drupal.org)
Then I see the pre-compiled UI Kit code residing in lib/uikit directory of the CivicTheme Drupal theme root
And the Drupal theme’s components is a symlink to lib/uikit/components UI Kit’s directory
AC2 - UIKit code is automatically added during publishing to Drupal.org
Given I am a developer of the CivicTheme
When I push code to develop branch of the CT Source repository
Then the UIKit is automatically added at the specific version set in package.json in the CivicTheme Drupal theme root
And the version is set to the latest published version of the UI Kit
Note: The latest published version can be found in the NPM repo: npm: @civictheme/uikit
AC3 - UIKit code can be updated for development of the Drupal theme
Given I am a developer of the CivicTheme
And I want to use a custom code version of the UIKit located on the specific branch in GitHub
When I follow the provided documentation in the Drupal theme to update the version of the UI Kit
Then I can see the U Kit code from the feature branch available in the Drupal theme when it is deployed
Solution Direction
Update the build script in the monorepo-drupal repo to install UIKit into node_modules based on the value of set in the package.json and then copy it to lib/uikit
Update PHPCS exclusion script to add the PHPCS exclusion comment (// phpcs:ignoreFile) to UI Kit’s files.
Update Bats tests to make sure that the build script has correctly sourced the UIKit codebase into the directory AND updated the symlink to components directory.
Update Bats tests to make sure that only expected UIKIt assets exists in the baked version of the Drupal theme.
Update the .gitignore file to ignore lib/uikit directory.
Update the .gitignore.artifact file to not ignore lib/uikit directory.
Provide documentation on how to switch the version of the UIKit for development.
Testing Notes
AC1 and AC2 can be tested by QA by inspecting the code in Drupal.org
AC3 can be tested by a developer or a QA with a development background by following the steps:
A “minor change” could be something visual, like altering a width of the border of an element. For example Accordion’s panel border width https://github.com/civictheme/uikit/blob/main/components/02-molecules/ac...
Fixed
1.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.