Features/#477 link youtube channel#1612
Conversation
… browser back navigation Fixes issue where recipe listing appeared black after navigating back in browser history. The page number and filters are now stored in URL query parameters and properly restored when navigating back. Changes: - Store page number in URL when pagination changes - Restore page number and filters from URL on component mount - Reload data when route query changes (back navigation) - Sync v-data-table-server page state with paginator Fixes openzim#1610
… browser back navigation Fixes issue where recipe listing appeared black after navigating back in browser history. The page number and filters are now stored in URL query parameters and properly restored when navigating back. Changes: - Store page number in URL when pagination changes - Restore page number and filters from URL on component mount - Reload data when route query changes (back navigation) - Sync v-data-table-server page state with paginator Fixes openzim#1610
Add automatic link generation to YouTube pages from the YouTube recipe editor. Users can now click buttons to open YouTube channels/playlists directly from the recipe editor. - Create youtube.ts utility for URL generation - Add link helper UI in ScheduleEditor - Support multiple ID formats and comma-separated IDs
… browser back navigation Fixes issue where recipe listing appeared black after navigating back in browser history. The page number and filters are now stored in URL query parameters and properly restored when navigating back. Changes: - Store page number in URL when pagination changes - Restore page number and filters from URL on component mount - Reload data when route query changes (back navigation) - Sync v-data-table-server page state with paginator Fixes openzim#1610
… browser back navigation Fixes issue where recipe listing appeared black after navigating back in browser history. The page number and filters are now stored in URL query parameters and properly restored when navigating back. Changes: - Store page number in URL when pagination changes - Restore page number and filters from URL on component mount - Reload data when route query changes (back navigation) - Sync v-data-table-server page state with paginator Fixes openzim#1610
…cases , Sir. I have realised that The duplicate requests when navigating back are caused by v-data-table-server already emitting a request internally while I was triggering another one manually. The repeated / flaky requests on direct URL navigation were due to the route watcher and the internal table updates competing with each other and causing loops. I haev tried correcting these errors by decoupling data fetching form @update:options handler , introducing a watch on route.query to ensure that the data fetching is triggered by thus watcher( this should make sure that only one request is made on the current URL). currentPage and selectedLimit are now initialized directly from the route query string when the component mounts. Please point out any further conceptual/ code related errors.
|
@rgaudin , in #477 , we discussed generating links to youtube pages on the UI and my last finding is in the thread: #477 (comment). This PR seems to match my idea on how to implement it but nothing was said regarding cases where the links don't work and how to deal with it given this algorithm isn't from Youtube itself. Should we proceed with the PR? The most important file in the PR is https://github.com/openzim/zimfarm/blob/28c0b43773794ad9f4fdd35910db36a8f8158269/frontend-ui/src/utils/youtube.ts |
|
I'm aligned with the approach: guessing from input what kind of links and building it. We don't check whether valid or not. Not sure what to do about multiple playlists though… |
There was a problem hiding this comment.
@skyy-07 , I have added some review comments. As mentioned earlier, remove the changes that have to do with pagination or URL related logic from the routes as that's not what the PR is about.
Also, attach a screenshot of what the links look like in the PR description.
Also, pay attention to the linter errors. You should install pre-commit and make sure your PR passes the linter checks.
|
|
||
| // Watch for route changes to update filters | ||
| // Watch for route changes to update filters and reload data | ||
| watch( |
There was a problem hiding this comment.
This doesn't have anything to do with the Youtube link feature.
|
|
||
| const previousFilters = { ...filters.value } | ||
| loadFiltersFromUrl() | ||
|
|
There was a problem hiding this comment.
This doesn't have anything to do with the Youtube link feature.
|
|
||
| const selectedSchedules = computed(() => props.selectedSchedules) | ||
|
|
||
| // Calculate current page from paginator (page is 1-indexed) |
| <div | ||
| v-if=" | ||
| taskName === 'youtube' && | ||
| (field.dataKey === 'ident' || field.dataKey === 'id') && |
There was a problem hiding this comment.
It's going to always be id for the field.datakey or if you want to use ident, use field.key.
…/github.com/skyy-07/zimfarm into bugs/openzim#1610-recipe-listing-screen-fix
…-screen-fix' into bugs/openzim#1610-recipe-listing-screen-fix
- Removed unrelated changes to pagination/routes - Updated YouTube link helper logic - Fixed field.dataKey check in ScheduleEditor - Updated unit tests
|
Sir, I have been trying to get the swagger UI to run the post:Offliner using: |
Rationale
#The YouTube recipe editor lacked a quick way to navigate to the actual
YouTube page. This feature adds automatically generated links that
allow users to jump directly to YouTube channels, playlists, or videos
from the recipe editor, improving usability and workflow.
Changes
- Add youtube.ts utility for generating YouTube URLs from various ID formats