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

refactor(DashboardCreationController): update placeholder #1109

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"BcTablePager",
"BcToggle",
"DashboardChartSummaryChartFilter",
"DashboardCreationController",
"DashboardGroupManagementModal",
"DashboardTableSummaryDetails",
"DashboardTableValidators",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function show(
}
network.value = forcedNetwork || currentNetwork.value
state.value = 'type'
name.value = isLoggedIn.value ? '' : 'cookie'
name.value = isLoggedIn.value ? '' : ''
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not entirely sure on my own what this line does...which means that the whole feature needs refactoring...but plz never do things like this, because this line no is max-confusing

Suggested change
name.value = isLoggedIn.value ? '' : ''

(would exactly be the same)

}

defineExpose({ show })
Expand Down
2 changes: 1 addition & 1 deletion frontend/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"title": "Add a new dashboard",
"type": {
"accounts": "Accounts",
"placeholder": "Name",
"placeholder": "Enter dashboard name",
Copy link
Contributor

Choose a reason for hiding this comment

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

nice that you improve things along the way 💪.

But we are using placeholder as input labels.

See: https://www.deque.com/blog/accessible-forms-the-problem-with-placeholders/

Placeholder value should be an example of the things a user should input.
Maybe you come up with a different idea.

"subtitle": "What would you like to monitor?",
"validators": "Validators"
}
Expand Down
Loading