Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5b1f79d
refactor: _utils/js ➔ scripts
wesleyboar Oct 15, 2024
7a106f0
Merge branch 'epic/v3' into epic/v3--reorg
wesleyboar Oct 15, 2024
8659699
refactor(noop): order of require statements
wesleyboar Oct 18, 2024
c21dfc8
build: copy fonts, scripts, tokens via sh script
wesleyboar Oct 18, 2024
2bfa026
fix: tokens should be part of general build
wesleyboar Oct 18, 2024
7e71cce
feat: bootstrap5
wesleyboar Oct 18, 2024
3fa8570
fix: prebuild:demo script deleted
wesleyboar Oct 18, 2024
4fd9bfb
Merge branch 'main' into epic/v3--reorg
wesleyboar Oct 18, 2024
2bd604b
fix(build): do nto build tokens twice
wesleyboar Oct 18, 2024
fc63154
refactor(noop): rename bootstrap5 spinner readme
wesleyboar Oct 18, 2024
f78cc25
docs: formattng tweak
wesleyboar Oct 18, 2024
a989391
feat: bootstrap3
wesleyboar Oct 18, 2024
5aae21d
fix: bootstrap3 & bootstrap5
wesleyboar Oct 18, 2024
971408f
chore(bootstrap5): remove unused support style
wesleyboar Oct 18, 2024
cc5455d
refactor(bs3): partial (via hidden sub-component)
wesleyboar Oct 18, 2024
1e71cd9
feat(bootstrap4): WIP (col, container, row, form)
wesleyboar Oct 25, 2024
701a9f4
chore(bs4): WIP cleanup
wesleyboar Oct 25, 2024
a4c006f
feat(bs4): WIP (modal)
wesleyboar Oct 25, 2024
2970f61
feat(bs4): WIP (col container form) configs
wesleyboar Oct 25, 2024
c205a2e
fix(bs4): form checkbox overlaps label
wesleyboar Oct 25, 2024
90d0f7a
fix: file input field so short it is cropped
wesleyboar Oct 25, 2024
860f30c
feat(bs4): WIP (nav-tabs)
wesleyboar Oct 25, 2024
648990e
feat(bs4): WIP (figure)
wesleyboar Oct 25, 2024
b8c2c2f
feat(v3): pagination (#451)
wesleyboar Feb 17, 2025
a0353ad
Merge branch 'main' into epic/v3--reorg
wesleyboar Feb 17, 2025
b014517
Merge branch 'main' into epic/v3--reorg (CONT…)
wesleyboar Feb 17, 2025
ab20de1
fix(v3): merge forgot to rename .css to .postcss
wesleyboar Feb 17, 2025
2c81d5e
refactor(v3): mimic actual Bootstrap 4 component organization (#453)
wesleyboar Feb 18, 2025
ab738b9
Merge branch 'epic/v3' into epic/v3--reorg
wesleyboar Feb 18, 2025
2207041
refactor(v3): move bootstrap3 stylesheets
wesleyboar Feb 18, 2025
904d6c6
refactor(v3): move bootstrap3 into components
wesleyboar Feb 18, 2025
2068f66
chore(v3): add missing bootstrap4 subdir values
wesleyboar Feb 18, 2025
c719e4c
fix: pagination should inherit font size (#476)
wesleyboar Mar 5, 2025
09091b9
Merge branch 'epic/v3' into epic/v3--reorg
wesleyboar Jul 30, 2025
c6c6742
feat(bs5): border-spinner
wesleyboar Jul 30, 2025
0ec5e92
refactor(bs5): border-spinner → spinner-border
wesleyboar Jul 30, 2025
5a6b0b2
Merge branch 'epic/v3' into epic/v3--reorg
wesleyboar Jul 30, 2025
a35f367
Merge branch 'epic/v3' into epic/v3--reorg
wesleyboar Jul 30, 2025
b8f64d9
move(generics, settings): to tacc/
wesleyboar Jul 30, 2025
e885faf
move(elements, objects): to tacc/
wesleyboar Jul 30, 2025
584e7a2
move(components, tools, trumps): to tacc/
wesleyboar Jul 31, 2025
7c4cb04
admon… djangocms-* mkdocs python-m…down(x) …-docs
wesleyboar Jul 31, 2025
31fe7ed
fix/refactor: wy-breadcrumbs, admonition
wesleyboar Jul 31, 2025
be1f77e
refactor(components): … → …/… Batch 1
wesleyboar Jul 31, 2025
515521c
test: script to update any components UNTESTED
wesleyboar Aug 1, 2025
45981ed
fix: script to update any components UNTESTED
wesleyboar Aug 4, 2025
ddac888
refactor: script to update any components UNTESTED
wesleyboar Aug 4, 2025
4a5696f
move: (rename) script to update any components
wesleyboar Aug 4, 2025
05068f2
fix: script to update any components
wesleyboar Aug 4, 2025
0a65d37
chore: delete old script location
wesleyboar Aug 4, 2025
de85d02
feat: relative import fixing script
wesleyboar Aug 4, 2025
9e99ef4
refactor: all proper tacc/components
wesleyboar Aug 4, 2025
d9ed920
Merge branch 'epic/v3' into epic/v3--reorg
wesleyboar Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ npm run build:css -- --build-id="..."
##### Build Individual Stylesheets

```bash
npm run build:each -- src/lib/_imports/components/align.postcss src/lib/_imports/components/admonition.postcss ...
npm run build:each -- src/lib/_imports/components/c-callout/c-callout.postcss src/lib/_imports/components/c-island/c-island.postcss ...
```


Expand Down
3 changes: 2 additions & 1 deletion bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

/** Build CSS using the Core-Styles API */

const { buildStylesheets } = require('../src/main');
const mininmist = require('minimist');

const { buildStylesheets } = require('../src/main');

const ARGS = mininmist( process.argv.slice( 2 ) );
const BUILD_ID = ARGS['build-id'] || '';

Expand Down
40 changes: 40 additions & 0 deletions bin/copy-to-dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status

SOURCE_ROOT="src/lib/"
DEST_ROOT="dist/"

# To be reused with path appended
source_path="$SOURCE_ROOT"
dest_path="$DEST_ROOT"

# Copy vendor stylesheets (while preserving directory structure)
source_path="${SOURCE_ROOT}_imports/"
echo "Copy vendor stylesheets from '$source_path' to '$DEST_ROOT'"
rsync -av --prune-empty-dirs --include='*/' --include='*/vendor/*.css' --exclude='*' "$source_path" "$DEST_ROOT" \
|| { echo "Error copying"; exit 1; }

echo "Copied vendor stylesheets."

# Copy other files
dirs=("scripts" "fonts" "tokens")
for dir in "${dirs[@]}"; do
source_path="${SOURCE_ROOT}${dir}/"
dest_path="${DEST_ROOT}${dir}/"
echo "Copying $dir from '$source_path' to '$dest_path'."

# Check for source
[ -d "$source_path" ] \
|| mkdir -p "$source_path" \
|| { echo "Error recreating '$source_path'"; exit 1; }

# Remove past output
rm -rf "${dest_path}" \
|| { echo "Error removing destination"; exit 1; }

# Copy files
cp -r "$source_path" "$dest_path" \
|| { echo "Error copying"; exit 1; }

echo "Copied $dir."
done
84 changes: 84 additions & 0 deletions bin/fix-relative-imports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/bin/bash

# Fix Relative Imports Script
# Fixes broken relative imports in component files that were moved to subdirectories
# The files moved one level deeper, so relative imports need an extra "../"

set -e # Exit on any error

echo "🔧 Fixing relative imports in moved component files..."

# Change to project root, then to components directory
cd "$(dirname "$0")/.."
cd "src/lib/_imports/tacc/components"

# Find all component directories dynamically
# This covers all components, including those worked on independently of the refactor script
echo "📁 Discovering all component directories..."

# Function to fix relative imports in a component directory
fix_component_imports() {
local component=$1
echo "🔄 Fixing imports in $component..."

# Fix imports that reference ../tools/ (should be ../../tools/) - both quote types
find "$component" -name "*.postcss" -type f -exec sed -i '' 's|['\''"]../tools/|"../../tools/|g' {} \;

# Fix component-to-component imports that reference ./c-component/ (should be ../c-component/) - both quote types
find "$component" -name "*.postcss" -type f -exec sed -i '' 's|['\''"]\./c-|"../c-|g' {} \;

# Fix component variant imports that reference ../component-name.* or ../component-name--* (should be ./component-name.* or ./component-name--*)
# This handles any variant file belonging to the same component (selectors, structure, skin, variants, etc.)
find "$component" -name "*.postcss" -type f -exec sed -i '' "s|['\''\"]\.\./${component}[\.-]|\"\./${component}.|g" {} \;
find "$component" -name "*.postcss" -type f -exec sed -i '' "s|['\''\"]\.\./${component}--|\"\./${component}--|g" {} \;

echo " ✅ Fixed imports in $component"
}

# Fix imports for all component directories found
for component_dir in */; do
# Remove trailing slash to get component name
component="${component_dir%/}"

# Skip non-directories and common non-component items
if [[ -d "$component" && "$component" != ".DS_Store" && "$component" != "README.css" && "$component" != "config.yml" && "$component" != "demo.postcss" ]]; then
fix_component_imports "$component"
fi
done

# Fix asset paths in config.yml files
echo "🔧 Fixing asset paths in config.yml files..."

# We're already in the components directory from the previous section
# No need to cd again

# For each component subdirectory, fix asset paths in all config.yml files
for component_dir in */; do
component="${component_dir%/}"

# Skip non-directories and common non-component items
if [[ -d "$component" && "$component" != ".DS_Store" && "$component" != "README.css" && "$component" != "config.yml" && "$component" != "demo.postcss" ]]; then
echo " 🔄 Fixing asset paths for $component..."

# Go back to project root to find all config.yml files
cd "../../../../.."

# Fix basic component.css pattern
find . -name "config.yml" -type f -exec sed -i '' "s|../../assets/components/${component}\.css|../../assets/tacc/components/${component}/${component}.css|g" {} \;

# Fix variant component--variant.css pattern
find . -name "config.yml" -type f -exec sed -i '' "s|../../assets/components/${component}--\([^.]*\)\.css|../../assets/tacc/components/${component}/${component}--\1.css|g" {} \;

# Go back to components directory for next iteration
cd "src/lib/_imports/tacc/components"
fi
done

# Go back to project root
cd "../../../../.."

echo "✅ Fixed asset paths in config.yml files"

echo "✅ All relative imports and asset paths have been fixed!"
echo ""
echo "You can now run 'npm run build' to verify the build works correctly."
147 changes: 147 additions & 0 deletions bin/refactor-components.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
#!/bin/bash

# TACC Components Refactoring Script
# Refactors remaining flat components to subdirectory structure
# Based on pattern from commit be1f77e

set -e # Exit on any error

echo "🚀 Starting TACC Components Refactoring..."

# Change to components directory
cd "src/lib/_imports/tacc/components"

# Define components to refactor (excluding already refactored ones)
declare -a COMPONENTS=(
"c-callout"
"c-content-block"
"c-hero-banner"
"c-image-map"
"c-island"
"c-message"
"c-nav"
"c-page"
"c-pill"
"c-recognition"
"c-see-all-link"
"c-show-more"
"c-tag"
"c-update"
"cortal-icon"
)

# Function to refactor a single component
refactor_component() {
local component=$1
echo "📁 Refactoring $component..."

# Create subdirectory if it doesn't exist
mkdir -p "$component"

# Move main postcss file
if [ -f "${component}.postcss" ]; then
git mv "${component}.postcss" "${component}/${component}.postcss"
echo " ✅ Moved ${component}.postcss"
fi

# Move variant files of pattern ${component}.*.postcss
for variant_file in ${component}.*.postcss; do
if [ -f "$variant_file" ] && [ "$variant_file" != "${component}.postcss" ]; then
git mv "$variant_file" "${component}/$variant_file"
echo " ✅ Moved $variant_file"
fi
done

# Move variant files of -- pattern (--compact, --expanded, etc.)
for variant_file in ${component}--*.postcss; do
if [ -f "$variant_file" ]; then
git mv "$variant_file" "${component}/$variant_file"
echo " ✅ Moved $variant_file"
fi
done
}

# Function to update import paths
update_imports() {
local component=$1
echo "🔄 Updating import paths for $component..."

cd ../../../../.. # Go back to project root

# Update main component imports
find src -name "*.postcss" -type f -exec sed -i '' "s|components/${component}\.postcss|components/${component}/${component}.postcss|g" {} \;

# Update all variant imports with pattern ${component}.*.postcss
find src -name "*.postcss" -type f -exec sed -i '' "s|components/${component}\.[^/]*\.postcss|components/${component}/&|g" {} \;

# Update variant imports with -- pattern (--compact, --expanded, etc.)
find src -name "*.postcss" -type f -exec sed -i '' "s|components/${component}--\([^/]*\)\.postcss|components/${component}/${component}--\1.postcss|g" {} \;

cd src/lib/_imports/tacc/components # Go back to components directory

echo " ✅ Updated import paths for $component"
}

# Function to update or create config.yml
update_config() {
local component=$1

if [ -f "${component}/config.yml" ]; then
echo "📝 Updating config.yml for $component..."

# Check if context: already exists
if grep -q "^context:" "${component}/config.yml"; then
# Check if subdir already exists under context
if ! grep -q "subdir:" "${component}/config.yml"; then
# Add subdir property after context:
sed -i '' '/^context:/a\
subdir: "tacc/components/'$component'"\n' "${component}/config.yml"
echo " ✅ Added subdir to existing context in config.yml"
else
echo " ℹ️ subdir already exists in config.yml"
fi
else
# Add context: section with subdir at the end of the file
echo "context:" >> "${component}/config.yml"
echo " subdir: \"tacc/components/$component\"" >> "${component}/config.yml"
echo " ✅ Added context section with subdir to config.yml"
fi
else
echo "📝 Creating config.yml for $component..."
# Create new config.yml with context and subdir
cat > "${component}/config.yml" << EOF
context:
subdir: "tacc/components/$component"
EOF
echo " ✅ Created config.yml with context and subdir"
fi
}

# Main refactoring loop
for component in "${COMPONENTS[@]}"; do
echo ""
echo "🔧 Processing $component..."

# Check if already refactored (directory exists and main file is inside)
if [ -d "$component" ] && [ -f "${component}/${component}.postcss" ]; then
echo " ℹ️ $component files already moved, checking config.yml..."
# Still run config update in case context/subdir is missing
update_config "$component"
echo " ✅ $component config check complete!"
else
# Full refactoring needed
refactor_component "$component"
update_imports "$component"
update_config "$component"
echo " ✅ $component refactoring complete!"
fi
done

echo ""
echo "🎉 All components refactored successfully!"
echo ""
echo "📊 Summary:"
git status --porcelain | grep -E "(renamed|modified)" | wc -l | xargs echo " Files changed:"
echo ""
echo "🔍 Review changes with: git status"
echo "💾 Commit changes with: git commit -m 'refactor(components): move remaining components to subdirectories'"
6 changes: 4 additions & 2 deletions docs/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ Any support is for [Bootstrap v4](https://getbootstrap.com/docs/4.0) unless othe

| Core Styles <u>extends</u> | Bootstrap
| - | -
| [Row](https://github.com/TACC/Core-Styles/blob/v2.14.0/src/lib/_imports/components/bootstrap.row.css) | [Grid](https://getbootstrap.com/docs/4.0/layout/grid/): Row
| [Container](https://github.com/TACC/Core-Styles/blob/v2.14.0/src/lib/_imports/bootstrap4/container.css) | [Grid](https://getbootstrap.com/docs/4.0/layout/grid/): Container
| [Row](https://github.com/TACC/Core-Styles/blob/v2.14.0/src/lib/_imports/bootstrap4/row.css) | [Grid](https://getbootstrap.com/docs/4.0/layout/grid/): Row
| [Col](https://github.com/TACC/Core-Styles/blob/v2.14.0/src/lib/_imports/bootstrap4/col.css) | [Grid](https://getbootstrap.com/docs/4.0/layout/grid/): Col

| Core Styles <u>changes</u> | Bootstrap
| - | -
| [Container](https://cep.tacc.utexas.edu/static/ui/components/detail/bootstrap--container.html) | [Grid](https://getbootstrap.com/docs/4.0/layout/grid/): Container
| [Breadcrumb](https://cep.tacc.utexas.edu/static/ui/components/detail/bootstrap3--breadcrumb) | [Breadcrumb (**v3**)](https://getbootstrap.com/docs/4.0/components/breadcrumb/)
| [Modal](https://cep.tacc.utexas.edu/static/ui/components/detail/bootstrap--modal.html) | [Modal](https://getbootstrap.com/docs/4.0/components/modal/)
| [Nav Tabs](https://cep.tacc.utexas.edu/static/ui/components/detail/bootstrap--nav-tabs.html) | Navs: [Tabs](https://getbootstrap.com/docs/4.0/components/navs/#tabs)
| [Pagination](https://github.com/TACC/Core-Styles/blob/v2.14.0/src/lib/_imports/components/bootstrap.pagination.css) | [Pagination](https://getbootstrap.com/docs/4.0/components/pagination/)
| [Pagination](https://github.com/TACC/Core-Styles/blob/v2.14.0/src/lib/_imports/bootstrap4/pagination.css) | [Pagination](https://getbootstrap.com/docs/4.0/components/pagination/)

| Where Core Styles <u>yields</u> to | Bootstrap
| - | -
Expand Down
2 changes: 1 addition & 1 deletion docs/shortcuts/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ title: Form Patterns
| - | - | - | - | - |
| Trumps (Scope) | [S Form]({{path '/components/detail/s-form' }}) | new,<br/>recommended | few classes,<br />very strict markup | minimal TACC pattern |
| Components | [C Form]({{path '/components/detail/c-form' }}) | active,<br/>maintained | many classes,<br />some flexible markup | standard TACC pattern |
| Components | [Django CMS Forms]({{path '/components/detail/django-cms-forms' }}) | active,<br/>legacy | very many classes,<br />very strict markup | for a [Django CMS plugin](https://pypi.org/project/djangocms-forms-maintained/)* |
| Components | [Django CMS Forms]({{path '/components/detail/djangocms-forms' }}) | active,<br/>legacy | very many classes,<br />very strict markup | for a [Django CMS plugin](https://pypi.org/project/djangocms-forms-maintained/)* |

<small>* Used by [Core-CMS](https://github.com/TACC/Core-CMS)</small>
1 change: 1 addition & 0 deletions docs/upgrade-client.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hidden: true
46 changes: 46 additions & 0 deletions docs/upgrade-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Upgrade Client

## Table of Contents

- [v2 to v3](#core-cms-v2-to-v3)
1. [Removed](#removed)
2. [Changed](#changed)
3. [Added](#added)

## v2 to v3

### Removed

#### `.has-required`

##### `.s-form`

```diff
+ <div>
- <div class="has-required">
<label for="name">
Name
<span>(required)</span>
</label>
<input type="text" name="name" id="name" required>
</div>
```

##### `.c-form`

```diff
+ <div class="c-form__field">
- <div class="c-form__field has-required">
<label for="name">
Name
<span class="c-form__star">(required)</span>
</label>
<input type="text" name="name" id="name" required>
</div>
```

### Added

#### Bootstrap4

- [Forms](https://getbootstrap.com/docs/4.6/components/forms/)
Loading