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

Fix moin-nonexistent class in itemlinks starting with '+' #1703

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

UlrichB22
Copy link
Collaborator

Related to #1699.

It is hard to solve the problem with class non-existent. I added a hack in lines 205f of converters/link.py to show a possible solution for view '+meta', for example. IMO adding a dictionary with view_names and endpoint-function-names seems to be too complex.

Any ideas on how to improve this? Need help.

@UlrichB22 UlrichB22 requested a review from RogerHaase June 26, 2024 21:12
Copy link
Member

@RogerHaase RogerHaase left a comment

Choose a reason for hiding this comment

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

Agree this is the best way to fix the problem.

If constants/misc.py remains as:

VALID_ITEMLINK_VIEWS = ["+meta", "+history", "+download", "+highlight"]

maybe add a comment that +delete, +convert etc. will show as non-existent links,
else just add them all.

Copy link
Member

@RogerHaase RogerHaase left a comment

Choose a reason for hiding this comment

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

Agree this is the best way to fix the problem.

If constants/misc.py remains as:

VALID_ITEMLINK_VIEWS = ["+meta", "+history", "+download", "+highlight"]

maybe add a comment that +delete, +convert etc. will show as non-existent links,
else just add them all.

@UlrichB22 UlrichB22 changed the title Draft: Fix moin-nonexistent class in itemlinks starting with '+' Fix moin-nonexistent class in itemlinks starting with '+' Jul 1, 2024
@UlrichB22 UlrichB22 marked this pull request as ready for review July 1, 2024 19:59
@UlrichB22
Copy link
Collaborator Author

Fixes #1699.

In create_app a function has been added that retrieves the relationship between view name and endpoint to avoid a manually maintained dictionary with redundant data. I hope this is OK.

@UlrichB22 UlrichB22 requested a review from RogerHaase July 1, 2024 20:04
@RogerHaase RogerHaase merged commit ed17d53 into moinwiki:master Jul 2, 2024
6 checks passed
@UlrichB22 UlrichB22 deleted the link_converter branch July 3, 2024 12:41
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