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

Add text bookmarks #439

Merged
merged 9 commits into from
Jun 11, 2024
Merged

Conversation

cblanken
Copy link
Contributor

@cblanken cblanken commented Jun 7, 2024

This PR addresses issue #86 to add text bookmarks.

@jzohrab I'm pretty sure I've hit all the main requirements for the backend and smoke tests. Let me know if there's anything else I need to add or fixup before it would be ready to merge.

I think my next steps will probably be to add some demo data and maybe a mention of bookmarks in the Tutorial / Tutorial follow-up chapter and some basic acceptance tests.

I just wanted to get this PR posted before I lost steam :)

cblanken added 7 commits June 7, 2024 16:20
Before, the book_id and page number were were being used to find the appropriate
Text when editing and deleting bookmarks. Using the Text ID directly simplifies
these queries.

Note:
With the current page slider, it is inconvenient to access and update the current
Text.TxID of the current page. So the "Add bookmark" action from the slideout still
uses the `book_id` and `page_num` to access the appropriate Text record when adding
a new bookmark.
Fix the Text <-> TextBookmark relationship and make deletes cascading
@cblanken cblanken marked this pull request as ready for review June 7, 2024 21:14
@jzohrab jzohrab self-assigned this Jun 8, 2024
@jzohrab jzohrab added the enhancement New feature or request label Jun 8, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Jun 8, 2024

Thank you very much @cblanken ! I hope to start review today.

lute/bookmarks/routes.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@jzohrab jzohrab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks super, @cblanken . My main request is that bookmark edits and deletes should use the bookmark ID to find the database entity. (Some app designers prefer to use a "business key" rather than expose real entity IDs, but IMO we can stick w/ the IDs.)

If you're too busy to make these changes, LMK. This PR is very clear (👍🎉😄) and I can make the changes when I test it out locally. Super stuff!

lute/bookmarks/routes.py Outdated Show resolved Hide resolved
lute/bookmarks/routes.py Outdated Show resolved Hide resolved
lute/templates/bookmarks/list.html Show resolved Hide resolved
lute/templates/read/index.html Outdated Show resolved Hide resolved
lute/templates/read/index.html Outdated Show resolved Hide resolved
@jzohrab jzohrab assigned cblanken and unassigned jzohrab Jun 9, 2024
@cblanken
Copy link
Contributor Author

Thanks for the review. I should have some time to fixup everything tomorrow 👍

@cblanken
Copy link
Contributor Author

Oops. So it begins...me forgetting to run the lint before commiting now that the lint hook is disabled by default 😞

@jzohrab
Copy link
Collaborator

jzohrab commented Jun 11, 2024

Looks good! There are a few very small things (e.g. the bookmark title isn't required for a deletion, etc), but I'll fix them up when I check out this branch locally to try it out. I'll just commit those changes to my local branch, you'll see them when it's merged. I'll let you know if I get stuck, thanks very much @cblanken 👍

@jzohrab jzohrab merged commit c693bc1 into LuteOrg:develop Jun 11, 2024
17 checks passed
@jzohrab
Copy link
Collaborator

jzohrab commented Jun 19, 2024

Launched in 3.5.0. 🎉

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
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants