<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ceres/view, branch step-re-ordering</title>
<subtitle>Recipe server for your favorite dishes</subtitle>
<id>https://cgit.xengineering.eu/ceres/atom/view?h=step-re-ordering</id>
<link rel='self' href='https://cgit.xengineering.eu/ceres/atom/view?h=step-re-ordering'/>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/'/>
<updated>2026-08-13T19:15:49Z</updated>
<entry>
<title>WIP: Add JSON-based API under `/api`</title>
<updated>2026-08-13T19:15:49Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-08-13T18:53:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=60bdc926dd7235fd55930ebd5b30c2e346f8ca59'/>
<id>urn:sha1:60bdc926dd7235fd55930ebd5b30c2e346f8ca59</id>
<content type='text'>
TODO: Not all the information is provided there.

This commit provides an unstable JSON API for communication with an
upcoming Dart frontend.

Later it might be part of the public interface for integration into
other services. For this step it has to be ensured the semantics are not
changing a lot in the future which is currently out of scope.
</content>
</entry>
<entry>
<title>WIP: Add `up` and `down` buttons for recipe steps</title>
<updated>2026-08-11T09:22:48Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-08-11T08:36:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=5f66b2fc93d84cedd605bbacbd602cec98efc358'/>
<id>urn:sha1:5f66b2fc93d84cedd605bbacbd602cec98efc358</id>
<content type='text'>
TODO: Add `onclick` to add functionality

These buttons allow the user to move recipes steps up and down. The
commit covers only the user interface change.
</content>
</entry>
<entry>
<title>Introduce Dart infrastructure for frontend</title>
<updated>2026-08-11T09:22:48Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-08-11T09:14:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=40b3272f5660517a4c97f97afcc9c3ed787465a4'/>
<id>urn:sha1:40b3272f5660517a4c97f97afcc9c3ed787465a4</id>
<content type='text'>
The Dart programming language is excellent for frontend use. It is
suitable to write command line programs, web interfaces with the builtin
JavaScript transpiler and cross-platform applications with Flutter.

To focus on a small number of languages Dart should now be used for
frontend purposes as Go is used for backend purposes.

Thus it is a valid option to start the migration for Ceres from Go +
JavaScript to Go + Dart.

This commit sets up the infrastructure. A `view/dart/ceres.dart` file is
added together with tooling to transpile to JavaScript, embed it into
the Go executable and serve it. Furthermore the script which just prints
a message to the console is added to every page.

Further commits can move existing code to Dart or add new code in Dart.
</content>
</entry>
<entry>
<title>view: Implement favorite recipes</title>
<updated>2024-11-03T15:06:58Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T14:50:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=c1b976edd0c27fdc488da7ff4c1b7551df0323cd'/>
<id>urn:sha1:c1b976edd0c27fdc488da7ff4c1b7551df0323cd</id>
<content type='text'>
This marks favorite recipes with a `⭐` emoticon. The favorite flag
value can be set on the recipe edit page. Favorite recipes are listed
first on the recipe list view.

Furthermore as a second priority the created time stamp is used in the
recipe list so that more recent recipes are listed first.
</content>
</entry>
<entry>
<title>view: Display URL content on recipe page</title>
<updated>2024-10-24T18:24:46Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-24T18:24:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=43ed47bf3d51e25d3195870241bbe6619c43e459'/>
<id>urn:sha1:43ed47bf3d51e25d3195870241bbe6619c43e459</id>
<content type='text'>
This makes the recipe page less pretty. Nevertheless the URL is more
visible to the user which makes it more likely that errors in the URL
are detected.

This change is based on user feedback. Invalid URLs were added which led
effectively to data loss.
</content>
</entry>
<entry>
<title>view: Order ingredient summary by ingredient name</title>
<updated>2024-10-24T18:14:14Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-24T15:24:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=9422e8194245c9cdbfa09b38c20173964349e2a2'/>
<id>urn:sha1:9422e8194245c9cdbfa09b38c20173964349e2a2</id>
<content type='text'>
This makes it easier to write a shopping list for the required
ingredients.
</content>
</entry>
<entry>
<title>Switch to http.Handler</title>
<updated>2024-10-23T18:34:57Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-23T18:34:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=e66691083a2455c29b50a2970c0aba1d6afca753'/>
<id>urn:sha1:e66691083a2455c29b50a2970c0aba1d6afca753</id>
<content type='text'>
The used `func(http.ResponseWriter, *http.Request)` return values made
the HTTP handler factory functions quite unreadable. Thus it is switched
to the http.Handler type.
</content>
</entry>
<entry>
<title>Remove github.com/gorilla/mux dependency</title>
<updated>2024-10-22T19:53:30Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-22T19:17:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=dbc874e2b9f300bea7a18deda32e784afb0ab89a'/>
<id>urn:sha1:dbc874e2b9f300bea7a18deda32e784afb0ab89a</id>
<content type='text'>
The reason for the introduction of this dependency was that it was easy
to setup routes with HTTP method restrictions.

Since Go 1.22 this feature is part of the standard library. Method
restrictions are part of the patterns used to register routes [1].

[1]: https://pkg.go.dev/net/http#hdr-Patterns-ServeMux
</content>
</entry>
<entry>
<title>model: Replace global db variable by custom type</title>
<updated>2024-10-13T17:55:38Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-13T17:52:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=473052ed8f2c83052ed5b47a7f4cec68ac2621a6'/>
<id>urn:sha1:473052ed8f2c83052ed5b47a7f4cec68ac2621a6</id>
<content type='text'>
Reducing global variables makes it easier to understand functions
independently of the rest of the code.

Adding the new model.DB type as a custom variant of the sql.DB type
makes it possible to write methods for the database which makes the code
way more readable.
</content>
</entry>
<entry>
<title>model: Fix direct access to database</title>
<updated>2024-10-12T13:24:33Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-17T20:49:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=9d3a5fb85dc02e87fab879855c4c3bace5f753f2'/>
<id>urn:sha1:9d3a5fb85dc02e87fab879855c4c3bace5f753f2</id>
<content type='text'>
Instead a database transaction has to be used. Each database interaction
should be wrapped into a transaction to make sure any possible change
(even side-effects) can be rolled back in case of errors.
</content>
</entry>
<entry>
<title>Apply go fmt to all source files</title>
<updated>2024-09-11T18:25:54Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-11T18:25:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=54029aac92f17ec87d3ef0bb73fcdac271b209c9'/>
<id>urn:sha1:54029aac92f17ec87d3ef0bb73fcdac271b209c9</id>
<content type='text'>
This applies default Go code style recommendations.
</content>
</entry>
<entry>
<title>view: Fix time stamp bug</title>
<updated>2024-05-17T15:14:35Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-17T15:06:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=0416f520cff9716792ac0f3ade5f71187d07ac2e'/>
<id>urn:sha1:0416f520cff9716792ac0f3ade5f71187d07ac2e</id>
<content type='text'>
The recipe edit page HTML template did not contain the two time stamps
"Created" and "LastChanged" as hidden form values.

Thus the information was not passed from the backend to the frontend. On
a save the recipe without time stamp information was injected into the
backend.

This effectively deleted any time stamp information. This commit fixes
that bug by including all fields of the model.Recipe struct inside the
form of the recipe-edit.html template.
</content>
</entry>
<entry>
<title>view: Use number input for ingredient amount</title>
<updated>2024-05-17T15:14:29Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-17T13:51:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=c61e45a5a260d9804ebc4f54814edf1e1b471ac3'/>
<id>urn:sha1:c61e45a5a260d9804ebc4f54814edf1e1b471ac3</id>
<content type='text'>
This accepts only real numbers with a minimum step of 0.001 as input for
the amount field of a recipe ingredient.

The browser has the chance to give the user direct feedback that a
non-numeric string will not work.
</content>
</entry>
<entry>
<title>view: Remove empty ingredient summaries</title>
<updated>2024-05-15T18:42:09Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-15T18:42:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=d14aece3295405b4377ea20aabd9c621aace4922'/>
<id>urn:sha1:d14aece3295405b4377ea20aabd9c621aace4922</id>
<content type='text'>
If the recipe has no ingredients at all the "Ingredient summary:" text
used to be displayed. This is not useful and confusing. It is removed
with this commit.
</content>
</entry>
<entry>
<title>view: Require text for steps</title>
<updated>2024-05-15T17:39:17Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-15T17:39:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=34880a0194f66e2b1808b45abfb01497d4816aaf'/>
<id>urn:sha1:34880a0194f66e2b1808b45abfb01497d4816aaf</id>
<content type='text'>
It does not make sense to add empty steps.
</content>
</entry>
<entry>
<title>view: Require ingredient type</title>
<updated>2024-05-15T17:37:05Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-15T17:37:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=29c8c305c52b97248e505cdfc6b86e96f57d0a53'/>
<id>urn:sha1:29c8c305c52b97248e505cdfc6b86e96f57d0a53</id>
<content type='text'>
It does make sense to add an ingredient only with a type and no amount
or unit like 'salt'. But it does not make sense to add an ingredient
without a type like '5' or '2 l'.
</content>
</entry>
<entry>
<title>view: Update to simple.css v2.3.0</title>
<updated>2024-05-15T17:33:11Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-15T17:33:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=45a0a10c070e3dba33be01d4de4d094fd7f7394a'/>
<id>urn:sha1:45a0a10c070e3dba33be01d4de4d094fd7f7394a</id>
<content type='text'>
This is the latest available release. Updated to keep up to date and
adopt fixes.
</content>
</entry>
<entry>
<title>view: Rename to 'Ingredient summary:'</title>
<updated>2024-05-15T17:27:05Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-15T17:27:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=b48f4514a44450da1ad5da68ce434c2b87e721d0'/>
<id>urn:sha1:b48f4514a44450da1ad5da68ce434c2b87e721d0</id>
<content type='text'>
This used to be named 'Ingredients: which might be confusing since
ingredients are defined per step and the list at the top of the recipe
is just a summary.
</content>
</entry>
<entry>
<title>When adding a recipe step or an ingredient the browser should focus on</title>
<updated>2024-05-15T17:20:01Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-15T17:20:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=d8b40f0a0a2ac2bcb8b9b690166ae7594c067298'/>
<id>urn:sha1:d8b40f0a0a2ac2bcb8b9b690166ae7594c067298</id>
<content type='text'>
the first text input of that new element.

This supports using Ceres without a mouse and only with tab-based
navigation with a keyboard.
</content>
</entry>
<entry>
<title>view: Complete ingredient editing</title>
<updated>2024-05-14T18:43:41Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-14T18:14:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=a87128138bdb301ede64049ec5068e47abb5c839'/>
<id>urn:sha1:a87128138bdb301ede64049ec5068e47abb5c839</id>
<content type='text'>
</content>
</entry>
<entry>
<title>view: Add HTML for editing recipe ingredients</title>
<updated>2024-05-13T19:52:48Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-13T19:51:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=b5b72880a0b6e9f188b532c9b2ad360ff1dab2ea'/>
<id>urn:sha1:b5b72880a0b6e9f188b532c9b2ad360ff1dab2ea</id>
<content type='text'>
</content>
</entry>
<entry>
<title>view: Add ingredient overview to recipe read page</title>
<updated>2024-05-12T18:52:25Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-04-07T10:04:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=bf328dd38a28cf44cfa81c7f1dcd95936d2d0301'/>
<id>urn:sha1:bf328dd38a28cf44cfa81c7f1dcd95936d2d0301</id>
<content type='text'>
</content>
</entry>
<entry>
<title>view: Show ingredients on read page</title>
<updated>2024-05-12T18:52:25Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-04-07T09:56:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=01d97189d245300d65ca31d650dd868d1d1fc0d8'/>
<id>urn:sha1:01d97189d245300d65ca31d650dd868d1d1fc0d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>view: Use HTML template to add recipe steps</title>
<updated>2024-05-12T18:38:24Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-12T18:38:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=fec2fea87615e6ee3a6e73f7f98e021eee1b7098'/>
<id>urn:sha1:fec2fea87615e6ee3a6e73f7f98e021eee1b7098</id>
<content type='text'>
This makes the JS function way simpler and removes a duplication of the
step HTML code.
</content>
</entry>
<entry>
<title>view: Create new html/recipe-step.html</title>
<updated>2024-05-12T18:20:14Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-12T18:20:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=64ece1c4455ed6f8e8be5cb8f060f14b6131823f'/>
<id>urn:sha1:64ece1c4455ed6f8e8be5cb8f060f14b6131823f</id>
<content type='text'>
This allows to use it in two places:

- template for loop for backend-generated steps
- a HTML template tag for frontend- / JS-generated steps
</content>
</entry>
<entry>
<title>view: Move all JS code to static/ceres.js</title>
<updated>2024-05-12T18:06:17Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-12T18:06:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=f2800e8289e9637bb3227a5f9622edabf6529b0f'/>
<id>urn:sha1:f2800e8289e9637bb3227a5f9622edabf6529b0f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>view: Remove global JS code in recipe-edit.html</title>
<updated>2024-05-12T18:01:02Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-12T18:01:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=cfeff398f0ad7e4205dc26b66ca2b46ebca24606'/>
<id>urn:sha1:cfeff398f0ad7e4205dc26b66ca2b46ebca24606</id>
<content type='text'>
This makes it impossible to move the whole JS functionality into the
central ceres.js script. Moving that JS code there makes caching
possible and bundles all JS-related code in one file.

The overall goal is to get rid of as many JS code as possible.
</content>
</entry>
<entry>
<title>view: Add unit test for index handler</title>
<updated>2024-05-11T21:08:42Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-11T21:08:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=907bd7e63f4cf3cb01bc678e09fc5b8962afe750'/>
<id>urn:sha1:907bd7e63f4cf3cb01bc678e09fc5b8962afe750</id>
<content type='text'>
</content>
</entry>
<entry>
<title>view: Fix cancel button on recipe create</title>
<updated>2024-05-09T10:19:35Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-04-23T16:47:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=a2aa866e630c45e1db4fadbb20cb1a9d24384a79'/>
<id>urn:sha1:a2aa866e630c45e1db4fadbb20cb1a9d24384a79</id>
<content type='text'>
</content>
</entry>
<entry>
<title>view: Replace HTML form labels by placeholders</title>
<updated>2024-05-09T10:19:35Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-04-23T15:42:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=eb000e0cc514ebca753970ddb9135e09cb885d7a'/>
<id>urn:sha1:eb000e0cc514ebca753970ddb9135e09cb885d7a</id>
<content type='text'>
This takes up way less space in the code and the actual user view.
</content>
</entry>
</feed>
