barbie-bot
887d669f80
Remove duplicate disable/enable logic and fetch() calls
...
readoutUnitChanged was manually setting disabled/aria-disabled/tabindex
attributes — duplicating Turbo.StreamElement.prototype.disableElement/
enableElement which already exists for this purpose. Replace with calls
to those methods.
Also replace fetch() in setDefaultUnit and drop with form.requestSubmit()
so Turbo handles CSRF, stream responses and lifecycle natively.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-04 13:08:21 +00:00
barbie-bot
366662a948
Replace JS-generated wide table with ERB partial and Turbo Streams
...
- Add _wide_table.html.erb partial (server-rendered pivot table)
- Add load_measurements helper in controller to prepare @wide_groups and
@wide_quantities for all mutating actions
- Update index view to render the wide_table partial in #measurements-wide
- Add/update create, destroy, update turbo_stream views to refresh the
wide table atomically after each mutation
- Remove buildWideTable() and editMeasurementWide() from application.js
- Fix create.turbo_stream.erb condition (empty readouts are vacuously all persisted)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-04 12:28:32 +00:00
barbie-bot
1bc75f5d40
Fix column header lookup fragility, add fetch error handling, add tests
...
- Replace position-based column header lookup (ths[3]/ths[4]) with
data-column attribute selectors — immune to column reordering
- Add .catch() error handlers to editMeasurementWide and setDefaultUnit
fetch calls so failures surface in the console instead of silently
disappearing
- Add MeasurementsController integration tests covering index auth,
create with taken_at, empty-readout create, destroy, cross-user
destroy isolation, and update
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-04 10:24:26 +00:00
barbie-bot
bfd427c9b2
Add wide view and inline editing to Measurements page
...
The Measurements page gains a compact/wide view toggle (persisted in
localStorage). The wide view is a pivot table: rows = time points,
columns = quantity names (alphabetical), cells = value + delete button.
Clicking a value in either view opens an inline edit panel (Turbo Stream)
without leaving the page. The panel shows the quantity name, value input,
unit selector, taken_at picker, and Update/Cancel buttons.
Changes:
- MeasurementsController: add edit/update actions; order by taken_at desc
- measurements/index: compact table + wide container, view-toggle buttons
- measurements/_readout: data-* attributes for JS pivot builder; edit link
- measurements/_edit_panel, _edit_form, _edit_form_close,
edit.turbo_stream, update.turbo_stream: inline edit views
- application.js: groupMeasurements, buildWideTable (alphabetical cols),
getMeasurementsView / setMeasurementsView, editMeasurementWide,
readoutUnitChanged, setDefaultUnit
- application.css: compact/wide visibility rules, .wide-cell flex layout,
button.link reset, .items-table .form td alignment
- Pictograms: view-rows.svg, view-columns.svg (view-toggle icons)
- Locale: view_compact/view_wide toggle labels, edit link, update.success
- Tests: system tests for compact inline edit and wide view edit panel
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-03 22:03:10 +00:00
barbie-bot
3702e24153
Add taken_at to readouts and default unit to quantities
...
Readouts gain a taken_at timestamp (distinct from created_at) that records
when the measurement was actually taken. Measurements are now ordered by
taken_at descending.
Quantities gain an optional default_unit association. When set, the unit
is pre-selected in the measurement form. A "Set as default" button on the
unit selector lets users update the default directly from the form.
- Migrations: add taken_at (datetime) to readouts,
add default_unit_id (fk → units) to quantities
- Readout: expose taken_at in ATTRIBUTES permit-list
- Quantity: add default_unit belongs_to, expose in ATTRIBUTES
- QuantitiesController: load @user_units for form actions
- Quantities views: add Default unit column and select to form
- Readouts form: pre-select default unit; add "Set as default" button
(readoutUnitChanged / setDefaultUnit wired up in a later commit)
- Measurements form: default taken_at input to current time
- ApplicationHelper: propagate :form option to html_options in builder
- config/environments/test.rb: allow Capybara's dynamic host
- Tests: system tests for default-unit UI on the Quantities page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-03 22:01:52 +00:00
cryptogopher
d893e59293
Clean up and improve items-table styling
...
Closes #9
2026-03-25 18:42:24 +01:00
cryptogopher
33004f62bd
Improve Measurement form layout and styling
2026-03-22 01:06:38 +01:00
cryptogopher
687e6fcdff
Drop Readout.value decimal type in favor of float
2026-03-19 20:30:16 +01:00
cryptogopher
5ed066ad18
Unify border/outline parameters order
2026-03-06 01:42:32 +01:00
cryptogopher
dde4e52f1b
Fix form elements styling on hover
2026-03-06 01:33:23 +01:00
cryptogopher
a9091d76a8
Merge styles of <a>.button/<button>/<input type="submit"> into .button
...
Remove flash button
Fix some multi-selector specificity differences
2026-03-04 17:13:11 +01:00
cryptogopher
4175d31b9d
Update and format comments
2026-03-03 01:31:44 +01:00
cryptogopher
c659201904
Make [disabled] and [hidden] styles !important
2026-03-03 01:14:12 +01:00
cryptogopher
83b064ef3c
Merge recover password/resend confirmation forms into sign in/register
...
Closes #65 , #66
2026-03-01 20:04:42 +01:00
cryptogopher
ea8bff9b3d
Bundle update to Rails 7.2.3, Devise 5
2026-02-26 02:39:11 +01:00
cryptogopher
80130fb7d1
Allow cascade delete Unit/Quantity
...
Closes #32
2026-02-22 17:50:43 +01:00
cryptogopher
1ba7d29441
Update tests to match labeled form changes
2026-02-22 00:55:21 +01:00
cryptogopher
84945fa4b4
Simplify and improve labeled form
2026-02-22 00:53:18 +01:00
cryptogopher
675eb0aad8
Optimize styles; clean up <fieldset>
2026-02-03 15:33:37 +01:00
cryptogopher
bd1a664caa
Measurement form based on select-styled <details>
2026-01-31 17:22:09 +01:00
cryptogopher
0fb7f9946a
Create alternative, spreadsheet-like style
2025-07-29 15:43:49 +02:00
cryptogopher
d9bd2b46e3
Fix svg_tag display on Users tab
2025-07-26 23:24:54 +02:00
cryptogopher
3aaf06806f
Update Contributing section regarding gems and assets
2025-07-26 00:24:23 +02:00
cryptogopher
ef0f3cbae3
Revert to asset precompilation in production
2025-07-26 00:10:59 +02:00
cryptogopher
eb2d45ddc2
Draft auto-installation of database adapter gems
2025-07-25 15:32:31 +02:00
cryptogopher
ae5bad89ac
Update db schema
2025-07-25 15:31:41 +02:00
cryptogopher
da38d8b585
Create Devise routes only when 'users' table exists
...
Closes #42
2025-07-25 15:30:26 +02:00
magicfixin
5ffc6974f0
Improve installation process
2025-07-23 23:42:41 +02:00
cryptogopher
e12369cea1
Measurements#new form improvements
2025-05-13 22:30:58 +02:00
cryptogopher
ef3484dfdf
Update Measurements#new form pathnames on actions
2025-05-07 00:24:05 +02:00
cryptogopher
9dbcfddf98
Merge corrections provided by Bambuch, cont.
2025-04-26 19:12:56 +02:00
cryptogopher
cd9a64b5ad
Merge corrections provided by Bambuch
2025-04-26 18:32:45 +02:00
cryptogopher
f7e4fe2d38
Ignore .mysql_history
2025-04-25 14:27:53 +02:00
cryptogopher
a1e17aee85
bundle update
2025-04-25 14:27:01 +02:00
cryptogopher
e8a0768d97
Update Quantity.depth using WITH + UPDATE ALL
2025-04-25 14:25:13 +02:00
cryptogopher
d1593df0e0
Use callbacks instead of attribute methods to update cached values
2025-04-24 18:59:36 +02:00
cryptogopher
fe66522c21
Cached attribute definition (attr_cached)
2025-04-19 20:29:29 +02:00
cryptogopher
1cddc794d2
Cleanup Quantity :pathname related code
2025-03-23 13:11:14 +01:00
cryptogopher
3b30e58ff3
Persist Quantity :pathname
2025-03-23 12:56:57 +01:00
cryptogopher
4c867daabb
Patch ActiveRecord with PR 54658
2025-03-22 14:14:42 +01:00
cryptogopher
8401424efa
Partial refresh of Measurements#new form
2025-02-18 18:27:47 +01:00
cryptogopher
c48bf290fd
Implement Measurements#new
2025-02-18 11:25:32 +01:00
cryptogopher
2f3c0e40a6
bundle update
2025-02-13 22:16:59 +01:00
cryptogopher
72515b2aa2
Relax Ruby version requirement
2025-02-13 22:16:35 +01:00
cryptogopher
9d60eee16b
Add Measurements tab and #new form
2025-01-25 16:34:04 +01:00
cryptogopher
3d7daa8944
Create Readout model
2025-01-22 00:14:57 +01:00
cryptogopher
6300273186
Cleanup
2025-01-16 21:37:58 +01:00
cryptogopher
2fdd770457
Center images in 'icon only' table columns
2025-01-16 21:29:10 +01:00
cryptogopher
dada29d5e6
Fix table row indentation for hierarchy
...
Closes #57
2025-01-16 21:19:01 +01:00
cryptogopher
5fff9adf4d
Delete Units respecting foreign key constraint
2025-01-16 20:46:22 +01:00