Dashboard and form improvement#81
Merged
Merged
Conversation
There was a problem hiding this comment.
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
reportNameis 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_nameis normalized to a string (to handle blankreportName), but other parts of this template still rely onreport[:reportName]to build modal ids / targets for the “Show SQL” link. If a malformed report has a blankreportNamebut a non-blanksourceQuery, this will generate duplicate/invalid DOM ids (e.g.,-query-modal) and break Bootstrap modal behavior. Consider usingreport_nameconsistently (or falling back torecordIdfor a unique id) and/or hiding the SQL modal whenreport_nameis 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates: