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

feat: Implement widget flag for requesting interactive view #5144

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

juliusknorr
Copy link
Contributor

@juliusknorr juliusknorr commented Jan 26, 2024

☑️ Resolves

Allow apps that display link previews to pass in if they want to request interactive link previews or not. We default to false to not have any breaking behaviour for apps. When apps register a preview render function with registerWidget they can then handle either the non-interactive or interactive view based on that flag. Apps not handling this will just fallback to the existing preview rendering that is currently in place already.

Render interactive widgets as link preview

Just pass in the interactive property to the NcReferenceList component

<NcReferenceList :text="'https://nextcloud.com/f/1234'" :interactive="true" />

Render interactive widgets as reference provider

registerWidget('deck-board', (el, { richObjectType, richObject, accessible, interactive }) => {
	if (interactive) {
		// render interactive component to el
		return
	}
	// existing custom render functionality
})

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr added enhancement New feature or request 3. to review Waiting for reviews labels Jan 26, 2024
Copy link
Contributor

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

LGTM

@susnux susnux merged commit 0965f37 into master Jan 26, 2024
15 checks passed
@susnux susnux deleted the feat/noid/interactive-widget branch January 26, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add interactive mode for widget registration and rendering
3 participants