globalbibletools / gbt

https://interlinear.globalbibletools.com
15 stars 2 forks source link

feat: preview verses in lexicon #374

Closed Pertempto closed 7 months ago

Pertempto commented 8 months ago

What has changed

Connected Issues

closes #336

QA Steps

NOTE - there may be certain edge cases where the references aren't parsed or handled correctly. Getting the parsing logic correct is tricky. It might be nice to save those remaining edge cases for a separate issue and/or PR, since this one has dragged on so long. I'm pretty sure this PR covers at least 90% of the references correctly.

Post-Deployment

Pertempto commented 8 months ago

image

@arrocke I've started by attempting to parse out the ref tags in the LSJ. How do you want me to handle situations where multiple verses are referred to in one ref? For example "Mat.1:6, 12:3". When the user clicks the link should I try to show both verses in the preview? For the first implementation, could I focus on just showing the first verse of the ref in the preview? I don't want to make this PR overcomplicated.

Please ignore the weird styling, it's just to help me debug.

arrocke commented 8 months ago

How do you want me to handle situations where multiple verses are referred to in one ref?

Ideally, we would split this into two links, so Mat.1:6 would be one link and 12:3 a separate link

Pertempto commented 8 months ago

Ideally, we would split this into two links, so Mat.1:6 would be one link and 12:3 a separate link

Yeah I agree, but that makes parsing much more complicated. I'm not going to attempt that here. We can always improve in the future.

Pertempto commented 8 months ago

I just realized that you can pass a function to replaceAll. I'm going to try that, it should make parsing multiple references from one ref tag much easier.

Pertempto commented 8 months ago

I've got LSJ parsing working and very basic link functionality working

image

I still need to render the correct contents using a portal, and get BDB parsing working.

Pertempto commented 8 months ago

Making good progress...

image

Still need to handle rendering Hebrew correctly, and parsing BDB references

Pertempto commented 8 months ago

This is ALMOST ready! :tada:

To Do

arrocke commented 8 months ago

I'd like to get to this tomorrow, but realistically it might be Wednesday or Thursday. I have a busy week

Pertempto commented 8 months ago

I'll be out of town next week so I won't be able to apply any changes until the fifteenth

Pertempto commented 7 months ago

I think all changes have been addressed, I'm going to wait to update seed file until after #382 is merged.

Pertempto commented 7 months ago

@arrocke we need to update the lexicons on production with

nx import-lsj db
nx import-bdb db
arrocke commented 7 months ago

I'll do this later today as well as post release notes to slack