* propogate scale changes to print view
* fixed incorrect variable reference
* refactored shopping list recipe routes
cleaned up existing logic
added support for recipe scaling
* updated current revision
* adding to shopping list respects UI recipe scale
* added field annotations
* added tests for recipe scaling
* made column nullable and set to 1 during migration
* Filtering special characters during automatic linking of ingredients to instructions
Used a unicode group to have a set of all unicode punctuation marks
* allowing for linking of ingredients to instruction at the beginning of a newline in the instruction
* Extracted ingredient matching into a composable and added tests. Ignoring 2 letter words to avoid false matches.
While testing the code 2 letter matches were a large source of false positives.
* added new icons
* added timeline badge and dialog to action menu
* more icons
* implemented timeline dialog using temporary API
* added route for fetching all timeline events
* formalized API call and added mobile-friendly view
* cleaned tags
* improved last made UI for mobile
* added event context menu with placeholder methods
* adjusted default made this date
set time to 1 minute before midnight
adjusted display to properly interpret UTC
* fixed local date display
* implemented update/delete routes
* fixed formating for long subjects
* added api error handling
* made everything localizable
* fixed weird formatting
* removed unnecessary async
* combined mobile/desktop views w/ conditional attrs
* changed default sort direction for certain attrs
* added workaround for filtering out null datetimes
* filtered out null-valued results for certain sorts
* removed unecessary parse
* used minyear instead of 1900
* added chef hat
* removed unnecessary log
* modified recipe and recipe timeline event schema
changed timeline event "message" -> "event_message"
added "last made" timestamp to recipe
* added "I made this" dialog to recipe action menu
* added missing field and re-ran code-gen
* moved dialog out of context menu and refactored
removed references in action menu and context menu
refactored dialog to be triggered by a button instead
added route to update recipe last made timestamp
added visual for last made timestamp to recipe header and title
* added sorting by last made
* switched event type to comment
* replaced alter column with pydantic alias
* added tests for event message alias
* updated the sidebar; on mobile devices, the sidebar will be closed by default
* updated the AppSideBar
* change variable name
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
The only label that was applied to the shopping list view was one that was manually assigned. Now we first check if the item has a label, if not we check if the food has a label, then if there really is no label we display nothing.
Previously, the recipe-ratings component would not sync to the v-modeled value when doing it's own updating. This PR fixes that issue and ensures that the value is pushed up to the parent whether in emit only mode or not.
* add vitest
* initialize lib w/ tests
* move to dev dep
* run tests in CI
* update file names
* move api folder to lib
* move api and api types to same folder
* update generator outpath
* rm husky
* i guess i _did_ need those types
* reorg types
* extract validators into testable components
* (WIP) start composable testing
* fix import type
* fix linter complaint
* simplify icon type def
* fix linter errors (maybe?)
* rename client file for sorting
This PR does too many things :(
1. Major refactoring of the dev/scripts and dev/code-generation folders.
Primarily this was removing duplicate code and cleaning up some poorly written code snippets as well as making them more idempotent so then can be re-run over and over again but still maintain the same results. This is working on my machine, but I've been having problems in CI and comparing diffs so running generators in CI will have to wait.
2. Re-Implement using the generated api routes for testing
This was a _huge_ refactor that touched damn near every test file but now we have auto-generated typed routes with inline hints and it's used for nearly every test excluding a few that use classes for better parameterization. This should greatly reduce errors when writing new tests.
3. Minor Perf improvements for the All Recipes endpoint
A. Removed redundant loops
B. Uses orjson to do the encoding directly and returns a byte response instead of relying on the default
jsonable_encoder.
4. Fix some TS type errors that cropped up for seemingly no reason half way through the PR.
See this issue https://github.com/phillipdupuis/pydantic-to-typescript/issues/28
Basically, the generated TS type is not-correct since Pydantic will automatically fill in null fields. The resulting TS type is generated with a ? to indicate it can be null even though we _know_ that i can't be.
* refactored EventBusService to work outside FastAPI
* extended event models
* refactored webhooks to run through event bus
* added basic webhook test route
* changed get_all to page_all
* fixed incorrectly implemented Vue variables
* fixed broken webhook test
* changed factory from staticmethod to classmethod
* made query boundary definitions easier to read
* docs: fix typos
* typos: fix typos found by `codespell` across the codebase
* docs: fix `macOS` spelling
* docs: fix `authentification` terminology
"Authentification" is not a thing.
* docs: fix `localhost` typo in example link
* typos: fix in-code typos
These are potentially higher risk, but no other mentions of these typos
show up in the codebase.
* Add pytesseract
* Add simple ocr endpoint
replace extension argument
* feat/ocr-editor gui
* fix frontend linting issues
* Add service unit tests
* Add split text modes & single ingredient/instruction editing
* make split mode really reactive
* Remove default step and ingredient
* make the linter haappy
* Accept only image uploads
* Add automatic recipe title suggestion
* Correct regex
* fix incorrect array.map method usage
* make the linter happy again
* Swap route to use asset name
* Rearange buttons
* fix test data
* feat: Allow making image the recipe image
* Add translation
* Make the linter happy
* Restrict function setPropertyValueByPath generic
* Restrict template literal type
* Add a more friendly icon to creation page
* update poetry lock file
* Correct sloppy ocr classes
* Make MyPy happy
* Rewrite safer tests
* Add tesseract to backend test CI container dependencies
* Make canvas element a component global
* Remove unwanted spaces in selected text
* Add way to know if recipe was created with ocr
* Access to ocr-editor for ocr recipes
* Update Alembic revision
* Make the frontend build
* Fix scrolling offset bug
* Allow creation of recipes with custom settings
* Fix rebasing mistakes
* Add format_tsv_output test
* Exclude the tests data directory only
* Enforce camelCase for frontend functions
* Remove import of unused component
* Fix type and class initialization
* Add multi-language support
* Highlight words in mount
* Fix image ratio bug
* Better ocr creation page
* Revert awkward feature to scroll in Selection mode
* Rebasing alembic migrations sux
* Remove obsolete getShared function
* Add function docstring
* Move down ocr creation option
* Make toolbar icons more generic
* Show help at the bottom of the page
* move ocr types to own file
* Use template ref for the canvas
* Use i18n.tc to get strings directly
* Correct naming mistake
* Move Ocr editor to own directory
* Create Ocr Editor parts
* Safeguard recipe properties access
* Add loading frontend animation due to longer request time
* minor cleanup chores
Co-authored-by: Miroito <alban.vachette@gmail.com>
* initial public explorer API endpoint
* public API endpoint
* cleanup recipe page
* wip: init explorer page
* use public URLs for shared recipes
* refactor private share tokens to use shared page
Refactor recipe page to use break up the component and make it more usable across different pages. I've left the old route in as well in case there is some functional breaks, I plan to remove it before the official release once we've tested the new editor some more in production. For now there will just have to be some duplicate components and pages around.
* grouped "instructions" header with first section
* fixed sort by last updated date
* somewhat-hacky bugfix for large screens
* modified page size to be divisible by 4
* fixed missing export for new data forms
* fix typing on auth context
* extract user password strength meter
* fix broken useToggle method
* extend form to accept arguments for validators
* enforce password length on update
* fix user password change form
* added create dialogs to food and unit pages
* minor css tweaks
* properly reset create form
* added placeholder name attribute for type checking
* removed unnecessary value assignment
* type fixes
* corrected comment
* add autofocus and use ref<VForm> for form refs
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* added new sort icons
* added dynamic sort icons
* implemented local storage for sorting
and mobile card view
* fixed bug with local storage booleans
* added type hints
* bum vue use to use merge defaults
* use reactive localstorage
* add $vuetify type
* sort returns
* fix type error
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* fixed typo
* merged "all recipes" pagination into recipe card
created custom sort card for all recipes
refactored backend calls for all recipes to sort/paginate
* frontend lint fixes
* restored recipes reference
* replaced "this" with reference
* fix linting errors
* re-order context menu
* add todo
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
rewrite get_all routes to use a pagination pattern to allow for better implementations of search, filter, and sorting on the frontend or by any client without fetching all the data. Additionally we added a CI check for running the Nuxt built to confirm that no TS errors were present. Finally, I had to remove the header support for the Shopping lists as the browser caching based off last_updated header was not allowing it to read recent updates due to how we're handling the updated_at property in the database with nested fields. This will have to be looked at in the future to reimplement. I'm unsure how many other routes have a similar issue.
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* fix type errors on event bus
* webhooks fields required for new implementation
* db migration
* wip: webhook query + tests and stub function
* ignore type checker error
* type and method cleanup
* datetime and time utc validator
* update testing code for utc scheduled time
* fix file cmp function call
* update version_number
* add support for translating "time" objects when restoring backup
* bump recipe-scrapers
* use specific import syntax
* generate frontend types
* utilize names exports
* use utc times
* add task to scheduler
* implement new scheduler functionality
* stub for type annotation
* implement meal-plan data getter
* add experimental banner