Checkbox - working example -- NumberInput,TextInput - InputAttributes initialization moved to InputBase class #8

Merged
koma merged 4 commits from features/rewrite/checkbox into features/rewrite/main 2023-02-17 09:46:19 +00:00
Member

Checkbox

Checkbox
koma was assigned by stm 2023-02-16 09:57:53 +00:00
stm added 1 commit 2023-02-16 09:57:54 +00:00
stm added 1 commit 2023-02-16 10:32:57 +00:00
stm added 1 commit 2023-02-16 12:18:20 +00:00
stm added 1 commit 2023-02-16 13:27:18 +00:00
koma requested changes 2023-02-16 14:58:53 +00:00
koma left a comment
Owner

Pull request contains changes of several components and some styling issues. Some are commented, and as the repeat, please see me for corrections before continuing work.

Pull request contains changes of several components and some styling issues. Some are commented, and as the repeat, please see me for corrections before continuing work.
@ -63,0 +59,4 @@
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
if (Required)
Owner

Nested ifs should be joined in single condition, especially if all are single-lined.

Nested ifs should be joined in single condition, especially if all are single-lined.
@ -63,2 +62,3 @@
if (Required)
{
if (base.InputAttributes.ContainsKey("required")) base.InputAttributes.Add("required", true);
if (!InputAttributes.ContainsKey("required")) InputAttributes.Add("required", true);
Owner

See here

See [here](https://git.tompit.com/Connected/Connected.Components/pulls/8/files#issuecomment-141)
@ -1,7 +1,5 @@
using Connected.Utilities;
Owner

The line contains an invisible Unicode character that should definitely not be there.

The line contains an invisible Unicode character that should definitely not be there.
@ -124,4 +122,9 @@ public class InputBase : ComponentBase
[Parameter]
public string Placeholder { get; set; } = string.Empty;
Owner

Should probably be null if uninitialized. Minor detail.

Should probably be null if uninitialized. Minor detail.
@ -127,0 +125,4 @@
protected override async Task OnInitializedAsync()
{
if (InputAttributes is null) InputAttributes = new();
Owner

Single line if statements should be braceless, but not inlined, e.g.

if(bool)
	DoSth();

instead of

if(bool) DoSth();
Single line if statements should be braceless, but not inlined, e.g. ``` if(bool) DoSth(); ``` instead of ``` if(bool) DoSth(); ```
koma merged commit 42d67dee07 into features/rewrite/main 2023-02-17 09:46:19 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Connected/Connected.Components#8
No description provided.