Should we prefer dot notation for object settings? #1032
pnadolny13
started this conversation in
General
Replies: 1 comment 2 replies
-
My long term preference would be to improve setting definitions so that we can capture this complexity with having to sacrifice the UX. If a setting has sub-settings, we should just be able to define that as we normally would a setting, and then in interactive CLI and the eventual UI we could render and ask for the data properly. Folks could still use the dot notation or the environment variables and interactive could be updated to traverse the tree properly. kind: object # maybe we need a new type here?
label: Periods
name: periods
subsettings: # not a fan of subsettings but you get the idea
- name: contacts_completed
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: skills_summary
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: skills_sla_summary
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: teams_performance_total
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: wfm_skills_contacts
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: wfm_skills_dialer_contacts
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: wfm_skills_agent_performance
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: wfm_agents
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: wfm_agents_schedule_adherence
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes
- name: wfm_agents_scorecards
kind: options
options:
- label: Days
value: days
- label: Hours
value: hours
- label: Minutes
value: minutes |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This conversation was started in this PR but I wanted to pull it out to discuss further and get more thoughts.
Like @edgarrmondragon pointed out we can flatten an object setting into its individual elements using dot notation. The pros are that it simplifies the UX when setting them and also allows you to set individual elements with environment variables (see this comment for Edgar's explanation). The down side is that its sometimes very verbose i.e. the tap-nice-incontact example since the settings are 1-1 with a stream and definitions need to be redefined in each setting.
The plugin definitions today are a bit of a mix so would be good to decide on patterns:
Beta Was this translation helpful? Give feedback.
All reactions