Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop the Explore page #281

Merged
merged 35 commits into from
Feb 10, 2025
Merged

Develop the Explore page #281

merged 35 commits into from
Feb 10, 2025

Conversation

ndepaola
Copy link
Collaborator

@ndepaola ndepaola commented Feb 9, 2025

Description

New page for browsing image database w/o needing to build a project in the project editor:
Screencast from 2025-02-09 22-59-11.webm

Added a form for adding cards to project through detailed view modal:
image

Reworked shared frontend/backend typing:

  • Migrate frontend's generation of typescript types from JSON schemas to quicktype
  • Now using quicktype in backend too
  • Expanded scope of shared types
  • Typed all endpoint request and response bodies
  • Removed runtime reading of JSON schemas with quicktype and pydantic's validation methods
  • This constitutes an API breaking change (because I cleaned up a bunch of naming inconsistencies along the way)

Checklist

  • I have installed pre-commit and installed the hooks with pre-commit install before creating any commits.
  • I have updated any related tests for code I modified or added new tests where appropriate.
  • I have manually tested my changes as follows:
    • Clicked around a bunch in the new explore page
    • Clicked around a bunch in the rest of the app to ensure I didn't break anything
  • I have updated any relevant documentation or created new documentation where appropriate.
    • This is on the todo list

summary of explore page requirements:
* all filters optional, including search query
* control over result ordering
* page size of 20ish results?
* ideally reuse the "cards grouped together / cards grouped by source" UI from grid selector
todo:
* sorting by source doesn't work. probably just disable source reordering
* remove search filter for settings applying to cardbacks or not
* move search filters into left-hand pane, put results on right-hand pane
* multi-select for card types to include in results
bcherny/json-schema-to-typescript#258
considering moving from `json-schema-to-typescript`
because of this issue - probably a good opportunity
to modernise our frontend/backend type checking stack.
* define all shared types and request/response payload types
  in json schemas, then build language-native interfaces for
  those types with quicktype
* eliminates the need to read json schemas at runtime in backend
  and in frontend
* standardise to camelCase across the board for transport types
* this is an API breaking change
* remove redundant references to `common` folder
* update frontend with multi-stage build to reduce image size
* limit elasticsearch memory usage in local development
* refer to base docker-compose file in "prod" compose file directly
  (so you don't need to remember to include it when running compose)
@ndepaola ndepaola added the enhancement New feature or request label Feb 9, 2025
@ndepaola ndepaola self-assigned this Feb 9, 2025
@ndepaola ndepaola merged commit c9656ce into master Feb 10, 2025
3 checks passed
@ndepaola ndepaola deleted the explore-page branch February 10, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

1 participant