Skip to content

Upgrade django-simple-bulma to v3.0 (Bulma 1.0+ migration) #208

Description

@scanner

Background

We are currently on django-simple-bulma 2.6.0 (Bulma 0.9.4). Version 3.0.0 is a major breaking release that upgrades to Bulma 1.0+ and removes 16 previously supported extensions, replacing them with 7 actively maintained ones.

Actual Extension Usage Audit

A thorough audit of all templates and JS files reveals that most of our configured extensions were never actually used in the codebase. Here is the real picture:

Extension Configured Actually Used Notes
bulma-collapsible ❌ NOT USED EmailAccount card expand/collapse is pure Vue v-if — no collapsible API or CSS classes anywhere
bulma-notifications ❌ NOT USED Notifications use static Bulma CSS classes only, no dismiss JS needed
bulma-modal ❌ NOT USED Only modal is a disabled button for unimplemented message filter rules (being removed)
bulma-navbar-burger ⚠️ USED Mobile hamburger toggle in base.html:41 — needs JS replacement
bulma-tooltip ✅ USED Extensively used in index.html; still supported in v3.0 — no change
bulma-divider ❌ NOT USED No template usage found
bulma-switch ❌ NOT USED No template usage found
bulma-coolcheckboxes ❌ NOT USED No template usage found
bulma-ribbon ❌ NOT USED No template usage found

This makes the upgrade significantly simpler than feared.

Concurrent Cleanup: Remove Message Filter Rules Stub

The message filter rules feature is unimplemented and the modal/placeholder code can be removed entirely. This eliminates the one place bulma-modal appeared (as a disabled button). Files/sections to remove:

  • app/as_email/static/as_email/js/MessageFilterRules.js
  • app/as_email/static/as_email/js/message_filter_rule.js
  • Import and component registration in email_account.js (lines 4, 102-103)
  • messageFilterRules prop from email_account.js (lines 39-43)
  • Template section in index.html lines 177-221 (button + modal)
  • v-model:message-filter-rules binding in index.html:594
  • {% block modal %}{% endblock modal %} in base.html:122 (becomes unused)

Required Code Changes

1. pyproject.toml

  • "django-simple-bulma==2.6.0""django-simple-bulma>=3.0.0"
  • Verify crispy-bulma is compatible with Bulma 1.0

2. app/config/settings.py — BULMA_SETTINGS

# After — minimal clean config
BULMA_SETTINGS = {
    "extensions": [
        "bulma-tooltip",
    ],
    "output_style": "nested" if DEBUG else "compressed",
}

3. app/templates/base.html

  • Line 17: Evaluate the hardcoded <link rel="stylesheet" href="{% static 'css/bulma-tooltip.css' %}"> — in v3.0 the tooltip extension CSS is served by SimpleBulmaFinder; check if this static link conflicts or is still needed
  • Line 41: Navbar burger — bulma-navbar-burger provided the toggle JS. Bulma 1.0 ships its own JS that handles this, but our project uses a custom project_third_party_js tag (not the {% bulma %} template tag) which may not include Bulma's own JS. May need a small custom toggle script in app/static/js/base.js if Bulma 1.0 core JS is not auto-loaded.

4. CSS Regression Check (Bulma 0.9.4 → 1.0)

Bulma 1.0 is a significant CSS overhaul (color system, CSS custom properties). Run collectstatic and visually verify:

  • Login/password pages (crispy-bulma forms)
  • Main index page (cards, tags, tooltips, dropdowns)
  • Admin interface

Testing Checklist

  • python manage.py collectstatic succeeds
  • Mobile navbar burger toggles the menu open/close
  • Tooltips render on hover throughout index.html
  • EmailAccount cards expand/collapse correctly (Vue v-if — should be unaffected)
  • Form pages render correctly (crispy-bulma)
  • No visual regressions on login, index, admin pages
  • Message filter rules stub code fully removed

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions