Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public partial class ProjectDetailPageModel : ObservableObject, IQueryAttributab
[ObservableProperty]
bool _isBusy;

[ObservableProperty]
private bool _isCategoryPickerExpanded;

[ObservableProperty]
private List<IconData> _icons = new List<IconData>
{
Expand Down Expand Up @@ -177,6 +180,18 @@ private async Task TaskCompleted(ProjectTask task)
OnPropertyChanged(nameof(HasCompletedTasks));
}

partial void OnIsCategoryPickerExpandedChanged(bool value)
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

Extra space between 'void' and 'OnIsCategoryPickerExpandedChanged'. Should be single space for consistency with the similar method in TaskDetailPageModel.cs.

Copilot uses AI. Check for mistakes.
{
if (value)
{
SemanticScreenReader.Announce("Category ComboBox, State Expanded");
}
else
{
SemanticScreenReader.Announce("Category ComboBox, State Collapsed");
}
}

[RelayCommand]
private async Task Save()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public partial class TaskDetailPageModel : ObservableObject, IQueryAttributable
[ObservableProperty]
private bool _isExistingProject;

[ObservableProperty]
private bool _isProjectPickerExpanded;

public TaskDetailPageModel(ProjectRepository projectRepository, TaskRepository taskRepository, ModalErrorHandler errorHandler)
{
_projectRepository = projectRepository;
Expand Down Expand Up @@ -118,6 +121,18 @@ public bool CanDelete
}
}

partial void OnIsProjectPickerExpandedChanged(bool value)
{
if (value)
{
SemanticScreenReader.Announce("Project ComboBox, State Expanded");
Copy link
Contributor

Choose a reason for hiding this comment

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

Should/could be a localized text?

}
else
{
SemanticScreenReader.Announce("Project ComboBox, State Collapsed");
}
}

[RelayCommand]
private async Task Save()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@
Text="{Binding Description}" SemanticProperties.Description="Description" />
</sf:SfTextInputLayout>

<sf:SfTextInputLayout
<sf:SfTextInputLayout
Hint="Category"
SemanticProperties.Description="ComboBox to Select Category"
SemanticProperties.Hint="State Collapsed">
<Picker SemanticProperties.Hint="Select the category for the project"
ItemsSource="{Binding Categories}"
SemanticProperties.Description="ComboBox to select a category. Activate to browse and select a category">
<Picker ItemsSource="{Binding Categories}"
SelectedItem="{Binding Category}"
SelectedIndex="{Binding CategoryIndex}"
SemanticProperties.Description="Category State Expanded"/>
IsOpen="{Binding IsCategoryPickerExpanded, Mode=TwoWay}"/>
</sf:SfTextInputLayout>

<Label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,16 @@
SemanticProperties.Hint="Indicates if this task is completed" />
</sf:SfTextInputLayout>

<sf:SfTextInputLayout
<sf:SfTextInputLayout
IsVisible="{Binding IsExistingProject}"
SemanticProperties.Description="ComboBox to select Project"
SemanticProperties.Hint="State Collapsed"
SemanticProperties.Description="ComboBox to select a project. Activate to browse and select a project"
Hint="Project">
<Picker
ItemsSource="{Binding Projects}"
ItemDisplayBinding="{Binding Name, x:DataType=models:Project}"
SelectedItem="{Binding Project}"
SelectedIndex="{Binding SelectedProjectIndex}"
SemanticProperties.Description="Project State Expanded"
SemanticProperties.Hint="Which project this task belongs to"/>
IsOpen="{Binding IsProjectPickerExpanded, Mode=TwoWay}"/>
</sf:SfTextInputLayout>

<Button
Expand Down
Loading