Skip to content

Decision Tree: Frontend Changes in Rock

  1. Is the block a Core Rock block?

    • Yes → Avoid editing directly
    • No → Proceed to next step
  2. Is your change purely UI/CSS/UX tweak (color, outline, icon, animation)?

    • Yes → Use JS/CSS injection (via Page Settings > HTML/CSS or Lava block)
    • No → Proceed
  3. Does the change involve logic (saving, validation, data fetch) or new UI elements?

    • Yes → Check if Obsidian React block
      • Yes → Create Custom React block extension or Custom SPA block (in Obsidian)
      • No → If legacy WebForms block, consider Custom ASP.NET block clone
    • No → Consider just CSS tweaks or client JS
  4. Is the change shared or generic enough for contribution?

    • Yes → Propose PR to Rock (Spark) Core repo
    • No → Keep as local/custom extension or page script
  5. Will rapid UI feedback outpace server state sync?

    • Yes → Accept minor desync OR build UI sync logic with REST or event hooks
    • No → Simple UI toggle sufficient

Tradeoff Summary:

ApproachProsConsUse When
JS/CSS InjectionFast, no core touchPotential UI/Server desyncUI tweaks, quick fixes
Custom React SPA BlockFull UI control, SPAHigher dev time, learning curveNew UI features, complex logic
Custom WebForms BlockFamiliar legacy approachHard to maintain long-termLegacy heavy customization
Contribute Core PRBenefits all Rock usersRequires approval & processBroad, reusable improvements

Explore and learn. Released under the MIT License.