WIP: Draft: Support OpenGraph-based discovery for ExternalLinkWidget #2467
Draft
magicfelix
wants to merge 3 commits from
396-external-link-widet-auto-discovery into master
pull from: 396-external-link-widet-auto-discovery
merge into: aleksis:master
aleksis:master
aleksis:3960-extend-slideiterator
aleksis:1625-migrate-to-vuetify-4
aleksis:remove-vite-legacy-plugin
aleksis:weblate-frontend
aleksis:weblate
aleksis:renovate/selenium-4.x
aleksis:1644-dahsboard-widget-creation-broken
aleksis:renovate/node-26.x
aleksis:renovate/django-health-check-4.x
aleksis:renovate/django-countries-9.x
aleksis:1643-calendar-dashboardwidgets-throw-500er-error
aleksis:renovate/django-dbbackup-5.x
aleksis:1064-backchannel-logout
aleksis:sis2-with-sl
aleksis:fix/adapt-some-urls
aleksis:1533-notifications-reminders-for-events-todos
aleksis:1294-expose-free-busy-state-in-ui-for-personal-events
aleksis:1303-correctly-implement-recurring-todos-with-amends-recurrence-id
aleksis:1345-introduce-annotate-methods-for-more-person-related-rules
aleksis:1603-search-index-is-deleted-on-cache-flush
aleksis:1068-oidc-rp-initiated-registration
aleksis:1065-oidc-device-code-grant-flow
aleksis:1599-vite-build-fails-with-too-many-apps
aleksis:fix/sort-models
aleksis:1066-oidc-dynamic-client-registration
aleksis:tmp-ticdesk-dev
aleksis:ticdesk-search-map
aleksis:cherry-pick-2b8d2e01
aleksis:643-one-time-login-links
aleksis:1461-birthday-calendar-oom
aleksis:tmp-ticdesk-related-names-for-paweljong
aleksis:1459-manifest-json-not-found
aleksis:integrate-disable-into-usecrud
aleksis:update-container-image-base-to-trixie
aleksis:check/update-pyproject-toml
aleksis:check/update-builddeps-package-json
aleksis:check/update-prettier-ignore
aleksis:1445-todo-list-broken
aleksis:1364-track-date-of-beginning-and-end-of-group-membership
aleksis:1259-generalise-places
aleksis:use-object-form-reactivity
aleksis:1435-cruddaylist-does-not-detect-changes-in-existing-intervals
aleksis:tmp-ticdesk
aleksis:stable/4.0.0
aleksis:1366-frontend-for-creating-and-modifying-generic-personrelationships
aleksis:master-without-vue-3
aleksis:1376-expand-row-feature-of-v-data-table-doesn-t-work-when-items-include-date-time-objects
aleksis:release/4.1.0.dev2
aleksis:1372-fix-import-of-crudlist
aleksis:1353-adapt-chipselectfield
aleksis:check/update-eslint-rc-js
aleksis:check/update-tox-ini
aleksis:improve-selenium-startup
aleksis:1268-add-specific-availability-planning-frontend
aleksis:1343-fix-person-related-permissions
aleksis:newer-and-rebased-migrate-crud-to-vue-3-and-generalize
aleksis:1314-fix-handling-of-end-datetime-in-calendar-events-query
aleksis:migrate-to-uv
aleksis:tmp-ticdesk-4-0
aleksis:fix-inline-crud-list-is-create
aleksis:tmp-split-calendar-event-dialog
aleksis:release/4.1.0
aleksis:1260-refactor-account-registration-form-and-generalize-parts-of-it
aleksis:add-datacheck-fix-in-changelog
aleksis:1232-group-calendars
aleksis:1251-registryobjects-are-their-own-parent-registries
aleksis:1209-introduce-django-rest-framework-serializers
aleksis:1162-strange-behaviour-with-personal-events
aleksis:revert-7fe8b8b1
aleksis:check/delete-eslint-rc-js
aleksis:check/update-gitignore
aleksis:stable-3.2
aleksis:stable-3.1
aleksis:update/eslint
aleksis:1158-add-sorting-functionality-to-get_single_events
aleksis:1055-introduce-sub-school-terms
aleksis:1082-colorfield-sometimes-returns-8-digit-alpha-color-hex-code
aleksis:test-build
aleksis:emit-extracted-items-from-save-event
aleksis:886-prevent-graphql-query-mutation-name-collisions
aleksis:release/3.2.1
aleksis:1038-make-dialogobjectform-send-a-diff-on-edit-instead-of-the-whole-object
aleksis:release/3.1.6
aleksis:fix/counter-chip
aleksis:1021-allow-matching-of-social-accounts-to-local-accounts-by-email
aleksis:991-set-title-attribute-for-all-unclear-frontend-spots
aleksis:update-docs-without-release-distribution
aleksis:850-do-not-restart-vite-serve-on-every-uwsgi-reload
aleksis:991-use-tooltips-for-all-unclear-frontend-spots
aleksis:983-add-groups-by-person-query
aleksis:826-otp-token-emails-don-t-contain-anything-besides-the-token
aleksis:781-error-if-creating-a-new-school-term-without-a-start-and-end-date
aleksis:966-allow-setting-of-custom-queryset-when-creating-calendar-feeds
aleksis:tmp-for-add-simple-course-book-list
aleksis:release/3.2.0
aleksis:868-introduce-uuid-field-for-extensiblemodel
aleksis:958-introduce-parent-model-resource
aleksis:954-evaluate-strawberry-and-strawberry-django
aleksis:948-error-handling-with-personal-event-creation-is-not-usable
aleksis:fix-custom-events-fss
aleksis:923-introduce-vue-styleguidist
aleksis:899-move-person-type-fields-into-constant
aleksis:892-remove-model-extension-api
aleksis:manage-holidays
aleksis:831-data-management-for-the-model-room
aleksis:fix/oauth-toolkit-migration
aleksis:release-3.0
aleksis:stable-2.12
aleksis:819-fix-some-minor-issues-in-graphql-queries
aleksis:fix-container-image
aleksis:stable-2.11
aleksis:stable-2.10
aleksis:stable-2.13
aleksis:806-expose-string-representation-of-models-via-graphql-api
aleksis:800-move-generic-components-from-aleksis-app-plank-to-core
aleksis:debug-foo
aleksis:oidc-docs
aleksis:migrate-to-vue3
aleksis:789-remove-syncable-fields
aleksis:remove/ical-feed
aleksis:194-enable-async-framework-channels
aleksis:726-dynamically-build-vue-forms
aleksis:766-selfclosing-components-in-vue_base-html-break-the-page
aleksis:492-follow-up-view_persons_rule-not-usable-due-to-use-of-queryset_rules_filter
aleksis:751-include-fields-of-non-extensible-model-in-syncable-fields
aleksis:kort-core
aleksis:feature/vuejs
aleksis:717-docker-improve-image-size-by-fixing-cleanup-layer
aleksis:build-improvements
aleksis:697-3-0-meta-issue-for-graphql-back-end-and-vue-js-frontend
aleksis:185-create-notifications-for-announcement
aleksis:stable-2.7
aleksis:update/translation-files-13
aleksis:update/translation-files-12
aleksis:599-add-oauth-oidc-tests
aleksis:i10n-ru-ua
aleksis:tmp/cbes
aleksis:do-release-2.9
aleksis:docs/notifications
aleksis:180-add-template-management
aleksis:fix-import
aleksis:653-remove-cachalot
aleksis:635-test-e-mail-button
aleksis:397-dedicated-public-dashboard
aleksis:511-allow-custom-redirect-uri-schemes
aleksis:update/translation-files-8
aleksis:585-barcode-widget-for-person-fields
aleksis:dot-1.6.2
aleksis:281-corporate-design-for-html-mails
aleksis:592-oauth2-broken-in-2-4
aleksis:574-rewrite-password-change-templates
aleksis:reduce-docker-steps
aleksis:571-age-calculation-broken
aleksis:559-oauth-add-feature-to-limit-apps-to-groups
aleksis:feature/push-notifications
aleksis:feature/i18n-maintenance
aleksis:fix/oauth-skip-auth-detail
aleksis:523-integrate-sentry-for-performance-and-error-tracing
aleksis:prepare-release-2.1.dev0
aleksis:release/2.0
aleksis:387-jwt-provider-consumer-support
aleksis:update/translation-files
aleksis:496-service-worker-safari-does-not-support-broadcastchannel-api
aleksis:group-members-permissions
aleksis:prepare-release-2.0b2
aleksis:fix/trans-conflicts
aleksis:bp-2.0-use-importlib-instead-of-pkg-resources
aleksis:update/translation-files-2.0b0-1
aleksis:test-migration-test
aleksis:376-prevent-deep-linking-to-media-files
aleksis:feature/build-icons-automatically
aleksis:421-update-to-django-3-2
aleksis:set-sast-config-1
aleksis:feature/test-selenium-capabilities
aleksis:arg-apps
aleksis:feature/review-app
aleksis:test-docker-app-version
aleksis:feature/allow-app-source
aleksis:fix-ci-config
aleksis:feature/curlylint
aleksis:feature/gin-index-on-ext-data
aleksis:backup-over-ssh
aleksis:feature/keep_local_password_ldap
aleksis:340-correctly-implement-the-ckeditor
aleksis:143-mark-menu-entries-as-active-with-sub-sub-menu-entries
aleksis:feature/django-notifs
aleksis:2021-update-copyright
aleksis:catch-error
aleksis:update/poetry
aleksis:selenium
aleksis:269-photo-cropping-broken-2
aleksis:269-photo-cropping-broken
aleksis:fix-docker-build
aleksis:has-person
aleksis:update-poetry-lockfile
aleksis:pages-staging
aleksis:mix/conn-dne
aleksis:236-support-saml-and-oauth2-logins-as-consumer
aleksis:feature/custom-auth-backends-dev
aleksis:dev
aleksis:fix-isort
aleksis:214-add-notification-dashboard-widget-anything-to-notify-of-upcoming-birthdays
aleksis:157-include-django-letsagree
aleksis:215-add-geolocation-of-persons
aleksis:267-lint-add-spell-check
aleksis:291-rename-template-references
aleksis:270-ci-replace-kaniko-with-buildah
aleksis:217-add-support-for-defining-group-types
aleksis:feature/docker-extras
aleksis:153-use-complex-name-field-with-i18n-support
aleksis:debug-docker-build
aleksis:feature/material-admin
aleksis:pages-jonglieren
aleksis:179-group-contact
aleksis:169-support-nextcloud-talk-for-notifications
aleksis:develop-dashboard-feeds
aleksis:134-merge-dashboard-ajax
No reviewers
Labels
Clear labels
Security
TeX
Needs LaTeX template
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
Backend (view code, models, logic, etc.)
part
ci
part
docs
Issue or addition to the documentation
part
frontend
Frontend (templates, etc.)
part
i18n
Translation or internationalisation issue
part
non-technical
Non-technical (policy, maintenance, etc.) issue or discussion
part
packaging
Issue concerning the packaging of AlekSIS and components
prio
1
Priority High
prio
2
Priority Medium
prio
3
Priority Low
release-mr-5.x
size
large
size
medium
size
small
source
customer
Requested by a customer or affiliated user
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
Issue or merge request from other projects using AlekSIS or parts of it
type
breaking
type
bug
Bug
type
feature
New feature
type
refactoring
workflow
blocked
Issue is blocked by another issue
workflow
confirmed
The bug is reproducible and will be fixed
workflow
current-todo
workflow
discussing
Needs to be discussed before implementation
workflow
new-app
Requires new AlekSIS app, which has to be created
workflow
wontfix
The bug is not reproducible or the feature was decided against
No labels
Security
TeX
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
part
ci
part
docs
part
frontend
part
i18n
part
non-technical
part
packaging
prio
1
prio
2
prio
3
release-mr-5.x
size
large
size
medium
size
small
source
customer
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
type
breaking
type
bug
type
feature
type
refactoring
workflow
blocked
workflow
confirmed
workflow
current-todo
workflow
discussing
workflow
new-app
workflow
wontfix
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
aleksis/AlekSIS-Core!2467
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "396-external-link-widet-auto-discovery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #396
First I tried to query the OGP just after submitting the Widget creation. But I found no method to do that.
Is there a better way than doing it every time the Dashboard (/Widget) is accessed?
requested review from @nik
added 15 commits
masterCompare with previous version
marked this merge request as ready
added 9 commits
masterCompare with previous version
assigned to @nik
Is the OG data guaranteed to contain an
imagemember?Please use urljoin
Some additional questions:
requested review from @hansegucker and removed review request for @nik
Lastly, please update the changelog (in a separate commit)
Yes. According to https://ogp.me/
changed this line in version 4 of the diff
changed this line in version 4 of the diff
added 17 commits
masterCompare with previous version
But what if the icon URL in Opengraph changes, and it has to be updated? How do we distinguish that situation?
If the image URL (or any other field that could be filled using OGP) is empty, an internal field could be automatically set to "Use OpenGraph".
The (only) reason I see to not provide an UI option for OGP is, that it is a bit redundant. But maybe it's the better way, when we're going to retreive more information than only one field.
changed this line in version 5 of the diff
added 82 commits
masterCompare with previous version
marked this merge request as draft
added 18 commits
masterCompare with previous version
resolved all threads
added 1 commit
Compare with previous version
marked this merge request as ready
added 2 commits
Compare with previous version
added 2 commits
623b379e- Support OpenGraph-based discovery for ExternalLinkWidget710764f3- Update changelogCompare with previous version
added 2 commits
Compare with previous version
approved this merge request
Please be more specific about which field is missing
I think it should default to
False.Please move the
iffrom theinsert_ogp_datamethod here.What does the
callargument do? It is not used in the code, and it is never passed.Can this raise an exception?
Please swap the branches, i.e. check for
not is_validhere and raise then. This allows the rest of the code to be indentend one level less.This is protocol-agnostic, and allows for using
://literally (meaning "use the same protocol the site was loaded with")See above.
Is this necessary?
cleanshould be called anyway, so this would import OGP twice (please verify)The title should be checked as well, right?
This is already being checked in DashboardWidget's clean() method.
changed this line in version 11 of the diff
changed this line in version 11 of the diff
changed this line in version 11 of the diff
changed this line in version 11 of the diff
changed this line in version 11 of the diff
changed this line in version 11 of the diff
changed this line in version 11 of the diff
changed this line in version 11 of the diff
changed this line in version 11 of the diff
added 2 commits
Compare with previous version
Verified: Works.
resolved all threads
On second thought, the original exceptions should be raised here, so we do not throw a (translated)
ValidationErrorif this code is called from somewhere else thanclean.changed this line in version 12 of the diff
changed this line in version 12 of the diff
changed this line in version 12 of the diff
changed this line in version 12 of the diff
added 2 commits
Compare with previous version
It's now called in
clean()resolved all threads
added 2 commits
Compare with previous version
resolved all threads
changed this line in version 14 of the diff
added 1 commit
Compare with previous version
The
cleanmethod has to return a dictionary of cleand data, like described here: https://docs.djangoproject.com/en/4.0/ref/forms/validation/#validating-fields-with-cleanmarked this merge request as draft
aborted the automatic merge because source branch was updated
added 236 commits
master562bf06b- Support OpenGraph-based discovery for ExternalLinkWidgetcd2bb6a2- Update changelogef5637ba- Raise RuntimeError instead of base ExceptionCompare with previous version
removed review request for @hansegucker
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.