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

New feature: edit mcdict in a separate page #67

Merged
merged 13 commits into from
Nov 5, 2023
Merged

Conversation

delta-river
Copy link
Collaborator

This would be the fix for #58 .

Added features:

  • show the list of identifiers and their candidate concepts in http://localhost:4100/edit_mcdict
  • show some statistics: progress for each identifier and the number of occurrences and sogs for each concept
  • add edit button for each concept
  • if http://localhost:4100/ and http://localhost:4100/edit_mcdict are open at the same time and the mcdict is modified by either of them, then the other page is automatically reloaded to ensure the mcdict is the latest one
    • the version of the mcdict is managed by the MioGattoServer via http://localhost:4100/mcdict.json, where the json is a tuple [${version}, ${mcdict}]
image

File structures:

To run the edit mcdict page separately, a ts script (client/edit_mcdict.ts) and an html template (server/templates/edit_mcdict.html) are added.

Currently, edit_mcdict.ts and index.ts does not share any functions; they actually do use some common codes but the codes are copy-and-pasted from index.ts to edit_mcdict.ts, where the same functions are defined locally (using export {}).

These two ts files are compiled at the same via webpack.config.js.

@wtsnjp
Copy link
Owner

wtsnjp commented Oct 24, 2023

It seems you didn't commit server/templates/edit_mcdict.html, resulting in HTTP Error 500 on my local. Please fix this issue.

@wtsnjp
Copy link
Owner

wtsnjp commented Oct 24, 2023

Could you please add an "Edit Dictionary" button, which is just a link to /edit_mcdict in the Utility section of the sidebar?

It is recommended to merge the main branch before making this change since I've just merged #69, which also has a change in the Utility menu.

@delta-river
Copy link
Collaborator Author

delta-river commented Oct 26, 2023

It seems you didn't commit server/templates/edit_mcdict.html, resulting in HTTP Error 500 on my local. Please fix this issue.

I found the templates directory is currently set to be ignored in

templates
.

Should I fix this to commit server/templates/edit_mcdict.html ?

@delta-river
Copy link
Collaborator Author

Could you please add an "Edit Dictionary" button, which is just a link to /edit_mcdict in the Utility section of the sidebar?

For clarification, which of the followings do you mean?

  1. A new tab for edit_mcdict is created when clicking "Edit Dictionary" button
  2. The page is simply redirected (without creating a new tab) when clicking "Edit Dictionary" button

@delta-river
Copy link
Collaborator Author

delta-river commented Oct 26, 2023

It is recommended to merge the main branch before making this change since I've just merged #69, which also has a change in the Utility menu.

Sorry, I don't get the points of this. Can you tell me what actions I should take...?

@wtsnjp
Copy link
Owner

wtsnjp commented Oct 26, 2023

I found the templates directory is currently set to be ignored in

Oh, it seems this was introduced to ignore the top-level ./templates directory (e500342). I would like to keep the top-level ./template directory ignored, so would you find a way to ignore only that one (and not other templates directories under the tree)

@wtsnjp
Copy link
Owner

wtsnjp commented Oct 26, 2023

Could you please add an "Edit Dictionary" button, which is just a link to /edit_mcdict in the Utility section of the sidebar?

For clarification, which of the followings do you mean?

  1. A new tab for edit_mcdict is created when clicking "Edit Dictionary" button
  2. The page is simply redirected (without creating a new tab) when clicking "Edit Dictionary" button

Either is fine. Maybe the second is better since the current edit_dict does not consider operating both index and edit_dict simultaneously.

@wtsnjp
Copy link
Owner

wtsnjp commented Oct 26, 2023

It is recommended to merge the main branch before making this change since I've just merged #69, which also has a change in the Utility menu.

Sorry, I don't get the points of this. Can you tell me what actions I should take...?

Please just execute git merge main at the feature/mcdict_edit branch.

@delta-river
Copy link
Collaborator Author

I added the Edit Mcdict button to the index page. The index page simply redirects to /edit_mcdict page when the button is clicked.

image

@delta-river
Copy link
Collaborator Author

delta-river commented Oct 31, 2023

Maybe, should we add something like "Back to index page" button to /edit_mcdict page...?
(though I guess it can be done by just clicking the browser's "back" button)

@wtsnjp wtsnjp merged commit fc61645 into main Nov 5, 2023
@wtsnjp wtsnjp deleted the feature/mcdict_edit branch November 5, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants