@developers clicking on “view note on ankihub” just gets me to the main page on ankihub for suggestions, not the specific suggestion
Added accepted-suggestion, #deck-AnKing Overhaul for Step 1 & 2-AnKingMed and removed #deck-anking-overhaul-for-step-1–2-ankingmed, open-suggestion
Maybe instead of using HTML IDs (which won’t work if the suggestion is not in the first page), the suggestion ID can be passed as a search parameter, e.g. “id:690551”
@Ahmed7 @abdo.nh Could you explain what is not working in more detail? Is this about the View on AnkiHub
button in the add-on or a button on the website?
Clicking on the button for the note in the add-on brings me to this page, which is correct:
I believe it’s about the “View Suggestion on AnkiHub” link at the top of this post and @Ahmed7 just made a typo/mistake here.
Thanks, I understand the problem now.
Clicking on View Suggestion on AnkiHub
on top of this post takes you to this url:
https://app.ankihub.net/decks/e77aedfe-a636-40e2-8169-2fce2673187e/suggestions/?search=state:accepted&tab=change_note_suggestions#change-note-suggestion-690551
Filtering by the html element id of the suggestion doesn’t work if it’s not on the first page.
Here’s the related code:
https://github.com/ankipalace/ankihub/blob/97f0f46d89c8e8c6af2d6a8848c007b37e4dea02/ankihub/decks/utils.py#L240
@pedroven Do you know how to fix this?
yeah, probably we will have to add a filter by id to the suggestions and replace the current url with the new one (using the new filter)