Skip to content

Conversation

@f-lapinski
Copy link
Collaborator

Refactor ListJobAd component: CSS isolation and code cleanup

Description
This pull request refactors the ListJobAd.razor component to improve maintainability, fix UI layout issues, and adhere to standard C# coding conventions.

Key Changes

  • 🎨 CSS Isolation: Extracted styles from the <style> block into a separate ListJobAd.razor.css file to leverage Blazor's CSS isolation.
  • 📝 Naming Conventions: Renamed private fields to use _camelCase (e.g., _jobAds, _searchText, _isLoading) to match .NET coding guidelines.
  • Async Best Practices: Updated the ClearFilters method signature from async void to async Task to ensure proper error handling and task lifecycle management.
  • 🧹 Code Cleanup: Removed clutter from the Razor file to improve readability.

Files Changed

  • NoExp.Presentation/Components/Pages/JobAds/ListJobAd.razor
  • NoExp.Presentation/Components/Pages/JobAds/ListJobAd.razor.css (New)

change size of filter panel to static not scrollable
change logo to christmas one
fix type of ClearFilters method
Copilot AI review requested due to automatic review settings December 25, 2025 12:48
@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
NoExp.Application 70% 0% 23
NoExp.Domain 86% 100% 37
Summary 79% (55 / 70) 0% (0 / 10) 60

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the ListJobAd.razor component by extracting inline CSS to a separate CSS file for better maintainability, updating field naming conventions to follow .NET standards with underscore prefixes, and improving async method signatures. The key change addresses a UI bug where the logo was covering job ads by adjusting the sticky sidebar positioning.

Key Changes:

  • Extracted all inline <style> block CSS into a new ListJobAd.razor.css file with CSS isolation
  • Renamed all private fields from camelCase to _camelCase following .NET conventions (e.g., jobAds_jobAds, searchText_searchText)
  • Changed ClearFilters() method signature from async void to async Task for proper async/await pattern
  • Updated sidebar sticky positioning from top: 80px to top: 120px to prevent logo overlap

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 5 comments.

File Description
ListJobAd.razor.css New CSS file containing all component styles with updated sticky positioning (top: 120px) to fix logo covering issue
ListJobAd.razor Refactored to use _camelCase for private fields, removed inline styles, improved async method signature, and added null-coalescing operators for filter change handlers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@f-lapinski f-lapinski merged commit 1218bb1 into master Dec 25, 2025
7 checks passed
@f-lapinski f-lapinski deleted the fix-logo-covering-jobads branch December 25, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants