Skip to content

Conversation

@Dnouv
Copy link
Member

@Dnouv Dnouv commented Mar 28, 2025

Proposed changes (including videos or screenshots)

  • Adds a new method for making the App settings (select) dynamic
  • App developers can now add or remove new options from the select/multi-select menu

Issue(s)

Steps to test or reproduce

Within the App code:

// sample setting

const sampleSetting = {
            id: "testAppSetting_select",
            type: SettingType.SELECT,
            packageValue: "testAppPackageValue",
            required: true,
            public: false,
            i18nLabel: "TestApp_select_setting_label",
            i18nDescription: "TestApp_select_setting_description",
            values: [
                {
                    key: "testAppPackageValue",
                    i18nLabel: "TestApp_select_setting_value_label",
                },
                {
                    key: "value_2",
                    i18nLabel: "value_2",
                },
            ],
        }
const settingsAcc =
                this.getAccessors().environmentWriter.getSettings();

//Overwrite all the existing options with the new ones
// @ts-ignore
settingsAcc.updateSelectOptions("testAppSetting_select", [
                {
                    key: "3",
                    i18nLabel: `${message.text} - 3`,
                },
            ]);

// update the current value of the selected option
settingsAcc.updateValue("testAppSetting_select", "value_2");

Further comments

RCAI-4

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Mar 28, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Mar 28, 2025

🦋 Changeset detected

Latest commit: fc8e960

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 37 packages
Name Type
@rocket.chat/apps-engine Minor
@rocket.chat/meteor Minor
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/core-typings Minor
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/rest-typings Minor
@rocket.chat/ddp-streamer Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@rocket.chat/web-ui-registration Major
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Dnouv Dnouv changed the title feat (apps): Apps "select" setting updater feat (apps): Apps setting updater Mar 28, 2025
@Dnouv Dnouv changed the title feat (apps): Apps setting updater feat: Apps "select" setting updater Mar 28, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Mar 28, 2025

PR Preview Action v1.6.0

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35644/

Built to branch gh-pages at 2025-04-08 18:34 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Mar 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.63%. Comparing base (eecdcaf) to head (fc8e960).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #35644   +/-   ##
========================================
  Coverage    59.63%   59.63%           
========================================
  Files         2832     2832           
  Lines        68301    68301           
  Branches     15131    15135    +4     
========================================
  Hits         40730    40730           
  Misses       24962    24962           
  Partials      2609     2609           
Flag Coverage Δ
unit 75.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Dnouv Dnouv added this to the 7.6.0 milestone Apr 1, 2025
@Dnouv Dnouv marked this pull request as ready for review April 1, 2025 12:20
@Dnouv Dnouv requested a review from a team as a code owner April 1, 2025 12:20
@Dnouv Dnouv added the stat: QA assured Means it has been tested and approved by a company insider label Apr 8, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 8, 2025
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Apr 8, 2025
@Dnouv Dnouv added stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider labels Apr 8, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 8, 2025
@kodiakhq kodiakhq bot merged commit bbd14f8 into develop Apr 8, 2025
48 checks passed
@kodiakhq kodiakhq bot deleted the ae/new/settings_updater branch April 8, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants