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(desktop): add OCA.Talk.Settings API to customize and manage settings #12942

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Aug 12, 2024

☑️ Resolves

Adds new public API to register custom settings sections for Talk app using Web Components.

type TalkSettingsSection = {
	/**
	 * Section internal ID
	 */
	id: string
	/**
	 * Section visible name
	 */
	name: string
	/**
	 * WebComponent's (custom element's) tag name to render as the section content
	 */
	element: string
}

window.OCA.Talk.Settings = {
	/**
	 * Open settings dialog
	 */
	open()

	/**
	 * Register a custom settings section
	 * @param section - Settings section
	 */
	registerSection(section: TalkSettingsSection)

	/**
	 * Unregister a custom settings section
	 * @param id - Section ID
	 */
	unregisterSection(id: string)
}

Screenshots with demo

image

🏁 Checklist

  • 🌏 Tested with Chrome, Firefox and Safari or should not be risky to browser differences
  • 🖥️ Tested with Desktop client or should not be risky for it
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

@ShGKme ShGKme added this to the 💙 Next Beta (30) milestone Aug 12, 2024
@ShGKme ShGKme force-pushed the feat/custom-settings-sections branch from ff87de3 to f7721de Compare September 10, 2024 15:17
@ShGKme ShGKme changed the title feat(desktop): add talk settings frontend API feat(desktop): add OCA.Talk.Settings API to customize and manage settings Sep 10, 2024
@ShGKme ShGKme self-assigned this Sep 10, 2024
@ShGKme ShGKme marked this pull request as ready for review September 10, 2024 15:36
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme force-pushed the feat/custom-settings-sections branch from f7721de to 6be015a Compare September 10, 2024 16:18
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Changes look good, hope we don't have to change it later
Tested

Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

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

LGTM

@ShGKme ShGKme merged commit 3f582cb into main Sep 11, 2024
46 checks passed
@ShGKme ShGKme deleted the feat/custom-settings-sections branch September 11, 2024 08:31
@ShGKme
Copy link
Contributor Author

ShGKme commented Sep 11, 2024

/backport to stable30

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ☑️ Done
Development

Successfully merging this pull request may close these issues.

4 participants