greenlight icon indicating copy to clipboard operation
greenlight copied to clipboard

Room settings 3: Extended the `RoomSettings` and `RoomSettingsRow` UIs.

Open KH-Amir-TN opened this issue 2 years ago • 2 comments

Description

Synchronize room settings with rooms configurations.

This PR completes 3.

~~1. Create RoomSettingsGetter service that can take a room and return its settings as a Hash: :name => :value making sense of each setting and its config.~~ ~~2. Integrate the service in RoomSettingsController#show.~~ ~~3. Extend the RoomSettings and RoomSettingsRow UIs.~~

User story [Room Settings show]:


  1. A user authenticates.
  2. A user creates and accesses a room and its settings.

[If the setting config is "true" for the room setting]: 4. User will have the setting enabled and user cannot disable it.

NOTE: The API will set the setting value as if it was enabled, the front end only will disable the setting for editing but will not change its value.

[If the setting config is "false" for the room setting]: 3. User will not see the setting.

NOTE: The frontend will not mount the setting component to the DOM.

[If the setting config is "optional" for the room setting]: 3. User will have their setting with its registered status 'enabled|disbaled'. 5. User can alter the status of the setting and have proper feedbacks.

Testing Steps

  1. Pull the code.
  2. Install the dependencies bundle install && npm|yarn install.
  3. Clean the previous assets build by running rm app/assets/builds/* (This won't remove .keep since it's hidden).
  4. Clean the database and tmp files for a better isolation by running rails tmp:clear && rails db:schema:cache:clear && rails db:drop && rails db:create && rails db:migrate:with_data
  5. Run the linter and specs bundle exec rubocop --parallel && bundle exec rspec && npx eslint app/javascript/* --ext .jsx,.js
  6. Run ./bin/dev to run the assets builders processes and the Puma server all at once.

Screenshots (if appropriate):

KH-Amir-TN avatar Jul 27 '22 18:07 KH-Amir-TN

~~DEPENDS ON #3700~~

KH-Amir-TN avatar Jul 27 '22 19:07 KH-Amir-TN

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Aug 15 '22 19:08 sonarqubecloud[bot]