# web/libraries/ Investigation

**Date:** January 26, 2026  
**Found by:** Caleb during git commit

## What We Found

Directory: `web/libraries/nouislider/`

**Contents:**
- noUiSlider JavaScript range slider library
- Version: Unknown (no version file found)
- License: MIT (free for commercial use)
- Files: JS, CSS, minified versions, TypeScript definitions

## What is noUiSlider?

From README: "noUiSlider is a lightweight JavaScript range slider with aria and keyboard support, GPU animated, no dependencies, fully responsive, multi-touch support."

Commonly used for range filters in Drupal (like "price $0-$100" sliders).

## Where Did It Come From?

**Investigation Results:**
- ✅ NOT in composer.json or composer.lock
- ✅ NOT referenced in our custom ccsoccer module
- ✅ NOT referenced in Better Exposed Filters module (checked)
- ❓ Could be from another contrib module we have installed
- ❓ Could have been manually placed here
- ❓ Created on January 3, 2026 (git shows it as untracked since then)

**Hypothesis:** Likely installed by a contrib module that expects this library to be manually downloaded to web/libraries/. OR it was there from Andrew's D7 migration work.

## Should It Be in Git?

**Standard Drupal Practice:**
- `web/libraries/` is usually in `.gitignore`
- Third-party libraries should be managed by composer if possible
- Manual downloads are discouraged but sometimes necessary

**Our Options:**

### Option 1: Add to .gitignore (RECOMMENDED)
```bash
echo "web/libraries/" >> .gitignore
```

**Pros:**
- Standard practice
- Keeps repo clean
- If a module needs it, it should document that requirement

**Cons:**
- If something breaks after pull, we won't know why
- Andrew would need to manually recreate it if it's actually needed

### Option 2: Commit It
```bash
git add web/libraries/
git commit -m "Add nouislider library to web/libraries"
```

**Pros:**
- Preserves current working state
- If it's needed, everyone has it

**Cons:**
- Not standard practice
- Bloats repository with third-party code
- Should be composer-managed instead

### Option 3: Investigate Further (SAFEST)
1. Ask Andrew if he knows what uses nouislider
2. Check if any views/forms use range sliders
3. Try removing it and see if anything breaks
4. Then decide to commit or ignore

## Recommendation

**For now:** Create a `.libraries-note` file to document this, then add to .gitignore:

```bash
# Document what we found
cat > web/libraries/.libraries-note << 'EOF'
This directory contains nouislider JavaScript library.
Origin unknown - found during git investigation on 2026-01-26.
If removing this causes issues, check which module requires it.
Most Drupal modules document library requirements in README.
EOF

# Add to .gitignore
echo "web/libraries/" >> .gitignore
echo "!web/libraries/.libraries-note" >> .gitignore  # Keep the note file

git add .gitignore web/libraries/.libraries-note
git commit -m "Add web/libraries to gitignore, document nouislider library

Found nouislider JS library in web/libraries/ during commit.
Origin unclear - possibly from contrib module or D7 migration.
Following standard Drupal practice: third-party libraries not in git.
If removal causes issues, module requirements should be documented."
```

**If something breaks later:** We have this investigation document, we know it was nouislider, and we can restore it if needed.

## Follow-up Actions

- [ ] Ask Andrew if he knows about nouislider
- [ ] Check if any enabled modules have library requirements
- [ ] Test if removing web/libraries/ breaks anything
- [ ] If needed, find composer package for nouislider and install properly

---

**Lesson:** When finding unexpected untracked directories, investigate before ignoring. Document findings for future reference.
