Skip to content

Refactor: Extract CSS and dichotomous key into external files #4

@nate-layman

Description

@nate-layman

Current State

The app.R file currently contains:

  1. Inline CSS styles embedded in the R code
  2. The dichotomous key decision tree hardcoded as an R list structure

Proposed Changes

Extract CSS to external stylesheet

  • Move CSS from inline styles in app.R to a dedicated www/styles.css file
  • Benefits:
    • Cleaner separation of concerns
    • Easier to maintain and modify styles
    • Better syntax highlighting and linting for CSS
    • Follows standard Shiny app structure

Extract dichotomous key to external data file

  • Move the decision tree structure from app.R into a separate file (e.g., dichotra_decision_tree.json or similar)
  • Benefits:
    • Easier to update the decision tree logic without touching R code
    • Could potentially make it user-editable or configurable
    • Cleaner app.R structure
    • Makes the decision tree more visible and maintainable

Files Affected

  • /app/app.R - remove inline CSS and decision tree
  • /app/www/styles.css - new file for styles
  • /app/dichotra_decision_tree.json (or .yaml/.R) - new file for decision tree logic

Priority

Low - nice-to-have refactoring for maintainability

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions