Improve handling of large diffs in WebUI#19320
Improve handling of large diffs in WebUI#19320Sahitya0805 wants to merge 1 commit intoopenSUSE:masterfrom
Conversation
c1dc953 to
fcdf2e3
Compare
6410e3c to
543112c
Compare
f54f0a4 to
04e1c1f
Compare
728d370 to
c5d0168
Compare
c5d0168 to
ffad473
Compare
| Some of the changes are collapsed due to size. | ||
| = link_to(request_changes_path(@bs_request, @action, tarlimit: 0)) do | ||
| Expand changes | ||
| - if truncated? && User.session |
There was a problem hiding this comment.
You just switched around the logic from expandable? to truncated?. But this doesn't change any behavior. Especially none of the behaviors requested in #17856
Do you understand what you are doing or do you just page genAI output here?
ffad473 to
fba01c4
Compare
b593f6b to
388578a
Compare
51c4b12 to
6d4f503
Compare
|
@Sahitya0805 you are mixing bug fixes and refactorings in one PR which makes this very hard to review. See https://medium.com/@kentbeck_7670/bs-changes-e574bc396aaa for an explanation... |
80caf2a to
3281939
Compare
- Add repeated truncation warning at the point of truncation (per-file) - Add bottom-of-page warning in SourcediffComponent for better visibility - Use inline HAML logic for truncation check to keep classes original - Remove all unrelated workflow and refactoring noise
3281939 to
343cad5
Compare
|
Sorry, and thanks for the feedback. You're right the previous version mixed refactoring with the actual fix, which made it harder to review. I've now cleaned up the PR and kept it strictly focused on the intended behavior change. To clarify the fix:
I've limited the changes to the relevant HAML views and added a unit test to verify the warning is rendered when diffs are truncated. Please let me know if you'd prefer this to be split further or adjusted in any way. |
Summary
Improve handling of large diffs in the WebUI by ensuring truncation warnings are clearly visible at the point where the diff is cut off.
Problem
Currently, when a diff is truncated in the WebUI, the warning message is not always visible at the exact truncation point.
This makes it unclear to users that the displayed diff is incomplete, especially when scrolling through large files.
Solution
Changes
Verification
Run:
bundle exec rspec spec/components/sourcediff_component_spec.rb