Skip to content

Dashboard and form improvement#81

Merged
tungleduyxyz merged 2 commits into
masterfrom
kaui_5.20
May 19, 2026
Merged

Dashboard and form improvement#81
tungleduyxyz merged 2 commits into
masterfrom
kaui_5.20

Conversation

@tungleduyxyz
Copy link
Copy Markdown
Contributor

@tungleduyxyz tungleduyxyz commented May 16, 2026

Updates:

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the Analytics UI by enhancing the report creation/edit form UX (tooltips + clearer field labels), updating chart labeling/color behavior, and making the dashboard/report list more resilient when reports are missing or malformed (including empty-dashboard handling per #80).

Changes:

  • Enhanced report form with field-level tooltips and updated source field labeling/validation messaging (per #36).
  • Improved robustness for empty/malformed reports (disable destructive actions when reportName is blank; avoid dashboard empty-state breakage per #80).
  • Updated chart rendering UX (multi-color line chart + more readable series labels).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
config/locales/en.bootstrap.yml Updates report-related labels/messages; adds tooltip strings and cleanup guidance text.
app/views/kanaui/reports/_reports_table.html.erb Makes report table safer for malformed records; avoids crashes when schema fields are missing.
app/views/kanaui/reports/_form.html.erb Adds tooltip UI and adjusts client-side source configuration validation.
app/views/kanaui/dashboard/index.html.erb Adds an empty-reports UI state and disables inputs/actions when no reports exist.
app/controllers/kanaui/engine_controller.rb Prevents redirect loops by rendering a plain error when the dashboard can’t load.
app/controllers/kanaui/dashboard_controller.rb Makes default report selection safer when reportName is missing.
app/assets/stylesheets/kanaui/reports.css Adds styles for tooltip/help controls in the report form.
app/assets/stylesheets/kanaui/kanaui.css Adds styling for disabled “table button” state.
app/assets/javascripts/kanaui/kiddo/helper.js Adds series-name formatting/humanization helper for charts.
app/assets/javascripts/kanaui/kiddo/charts/pie_chart.js Uses the new series-name formatter when rendering labels.
app/assets/javascripts/kanaui/kiddo/charts/line_chart.js Switches to a multi-color palette and formats legend labels with the new helper.
Comments suppressed due to low confidence (2)

app/views/kanaui/reports/_reports_table.html.erb:23

  • report_name is normalized to a string (to handle blank reportName), but other parts of this template still rely on report[:reportName] to build modal ids / targets for the “Show SQL” link. If a malformed report has a blank reportName but a non-blank sourceQuery, this will generate duplicate/invalid DOM ids (e.g., -query-modal) and break Bootstrap modal behavior. Consider using report_name consistently (or falling back to recordId for a unique id) and/or hiding the SQL modal when report_name is blank.
      <% report_name = report[:reportName].to_s %>
      <tr>
        <td><%= report[:reportName] %></td>
        <td><%= report[:reportPrettyName] %></td>
        <td><%= report[:reportType] %></td>

app/assets/javascripts/kanaui/kiddo/charts/pie_chart.js:9

  • The comment says this is a "Custom blue color theme ... matching the line chart", but the line chart palette has been changed to a multi-color theme in this PR. Please update the comment (and/or consider aligning the pie palette if matching is still desired) to avoid misleading future maintainers.
    var helper = new Kiddo.Helper();

    // Custom blue color theme - matching the line chart
    var blueColors = [
      "#1565C0",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread config/locales/en.bootstrap.yml
Comment thread app/views/kanaui/dashboard/index.html.erb
Comment thread app/assets/javascripts/kanaui/kiddo/charts/line_chart.js Outdated
Comment thread config/locales/en.bootstrap.yml Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Comment thread app/views/kanaui/reports/_form.html.erb
Comment thread config/locales/en.bootstrap.yml
@tungleduyxyz tungleduyxyz merged commit 14cd565 into master May 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants