refactor: small css change to set search-bar max width to one third of header#2157
Merged
refactor: small css change to set search-bar max width to one third of header#2157
Conversation
Contributor
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- With
width: 100%,min-width: 500px, andmax-width: 33%on a flex item, there’s a risk of layout issues on smaller headers where 33% is less than 500px (the min-width will win and can cause overflow), so it’s worth double-checking the responsive behavior and possibly basing the sizing on flex-basis instead of width. - If the intent is to make the search bar at most one third of the header but never smaller than 500px, consider whether the container will always be wide enough (≥1500px); if not, you may want to relax the
min-widthor use a more flexible constraint (e.g.,min(33%, 500px)or similar) depending on browser support.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- With `width: 100%`, `min-width: 500px`, and `max-width: 33%` on a flex item, there’s a risk of layout issues on smaller headers where 33% is less than 500px (the min-width will win and can cause overflow), so it’s worth double-checking the responsive behavior and possibly basing the sizing on flex-basis instead of width.
- If the intent is to make the search bar at most one third of the header but never smaller than 500px, consider whether the container will always be wide enough (≥1500px); if not, you may want to relax the `min-width` or use a more flexible constraint (e.g., `min(33%, 500px)` or similar) depending on browser support.
## Individual Comments
### Comment 1
<location> `src/app/shared/modules/dynamic-material-table/table/dynamic-mat-table.component.scss:373-374` </location>
<code_context>
flex: 1 1 auto;
width: 100%;
- max-width: 500px;
+ min-width: 500px;
+ max-width: 33%;
mat-form-field {
</code_context>
<issue_to_address>
**issue (bug_risk):** The min/max width combination is likely to cause layout issues and may not match the intended responsiveness.
With `flex: 1 1 auto`, combining `min-width: 500px` and `max-width: 33%` will cause horizontal overflow below 500px and make the 33% cap ineffective until ~1500px. This can also interfere with how sibling flex items wrap. Consider whether you meant `max-width: 500px` with a smaller `min-width`, or swapping to a percentage-based `min-width` and pixel-based `max-width` to keep the layout responsive and avoid overflow.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
src/app/shared/modules/dynamic-material-table/table/dynamic-mat-table.component.scss
Show resolved
Hide resolved
Junjiequan
approved these changes
Jan 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the search bars max-width to 33% of the header while keeping the min-width unchanged
Motivation
Background on use case, changes needed
Fixes:
Please provide a list of the fixes implemented in this PR
Changes:
Please provide a list of the changes implemented by this PR
Tests included
Documentation
official documentation info
If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included
Backend version
Summary by Sourcery
Enhancements: