globalbibletools / lexicon-translation

1 stars 0 forks source link

3 explorer for finding words to edit #7

Open ilearner777 opened 2 weeks ago

ilearner777 commented 2 weeks ago

What has changed

Created a tree view to search by both Hebrew and Greek words.

Connected Issues

closes #3

QA Steps

  1. Execute script: ./scripts/extract-byWord-treeItems.js using input file: UBSHebrewDic-v0.9.1-en.JSON as a parameter.
  2. Compare output file: ./scripts/treeViewHebrewWordData.json with input file.
  3. Execute script: ./scripts/extract-byWord-treeItems.js using input file: UBSGreekNTDic-v1.0-en.JSON
  4. Compare output file: treeViewGreekWordData.json with input file.
  5. Run Extension
  6. Should see new Explorer tree view called: "FIND BY LEMMA"
  7. There should be 1st level nodes of "Hebrew" and "Greek"
  8. Selecting each 1st level node should open up a 2nd level of the alphabet of each language.
  9. Selecting a 2nd level node should open a 3rd level with each item displaying the first 2 letters of the lemma
  10. Selecting a 3rd level node should list all lemma's starting with the first 2 letters of the parent node.
  11. Select a lemma and it should open up the corresponding XML file.

Post-Deployment

ilearner777 commented 2 weeks ago

I have completed the Find by word (lemma) tree view prototype.
Please review and let me know if you want anything changed. If not, I will move it out of draft state.

arrocke commented 1 week ago

@ilearner777 Two requests to make this easier to review:

  1. Could you remove the .vscode directory from the .gitignore and commit what you have in that directory? I'm getting some errors in the build and debug that I think are attributed to my .vscode settings not being correct
  2. Can you open a separate PR with just the hebrew and greek data? This is going to be difficult to code review with so many files
ilearner777 commented 1 week ago

@ilearner777 Two requests to make this easier to review:

1. Could you remove the .vscode directory from the .gitignore and commit what you have in that directory? I'm getting some errors in the build and debug that I think are attributed to my .vscode settings not being correct

2. Can you open a separate PR with just the hebrew and greek data? This is going to be difficult to code review with so many files
  1. I have removed .vscode directory from the .gitgnore and issued commit and sync.
  2. I have opened a separate PR with just the hebrew and greek data. Here is link: https://github.com/globalbibletools/lexicon-translation/pull/8

Let me know if you need anything else.

arrocke commented 6 days ago

Ok, I'm still having trouble getting this to work. I think I need to open the root repo in the test instance of VSCode, but it won't let me. Can you elaborate on how you are running the extension in the test instance of VSCode? I'm seeing the find by lemma, but nothing is populating inside

This does point to something we should address for this to work properly. Currently, it seems like the extension depends on the json files being present in the folder you have opened in VSCode, but I think we want the tree view to be be populated regardless of what folder is open, which means those json files need to be part of the extension.

ilearner777 commented 5 days ago

Ok, I'm still having trouble getting this to work. I think I need to open the root repo in the test instance of VSCode, but it won't let me. Can you elaborate on how you are running the extension in the test instance of VSCode? I'm seeing the find by lemma, but nothing is populating inside

This does point to something we should address for this to work properly. Currently, it seems like the extension depends on the json files being present in the folder you have opened in VSCode, but I think we want the tree view to be be populated regardless of what folder is open, which means those json files need to be part of the extension.

My Thoughts

This tree view depends on the correct location of 2 directories:

Right now these are hard-coded in my file: ./src/treeViewLemma.ts file. So yes, I agree we need a way to indicate to the extension where these are located on local machine.

One way to do this is to store the location of the data directory path by contributing an extension-specific setting with the contributes.configuration Contribution Point and read them using the workspace.getConfiguration API. This might be something that is automatically setup using the Project Manager when it scaffolds the application

Another thing I can do is to add code, if the tree view is empty, that will display helpful text along with a button that would allow the user to select where the data directory is located. I could then store that value in a settings variable mentioned above and then refresh the view. This is what VS Code does when the workspace does not have an open folder. Screenshot_2

Let me know if you want me to add some of these features to my extension. Please pass along any other comments or suggestions you may have.

FYI

Here is a screen shoot of the extension running on my machine for your reference. Screenshot_1

arrocke commented 5 days ago

My recommendation would be to import the two json files at the top of the tree view, and then modify readAndProcessFile to take the data instead of a file name. Now the JSON data will be included in the bundle for the extension and we won't have to bother loading the files at runtime