Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix associative array cell content in Table widget #19908

Merged
merged 23 commits into from
Aug 9, 2023

Conversation

rhertogh
Copy link
Contributor

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues -

Currently passing an associative array as cell content breaks the Table widget.

rhertogh and others added 21 commits July 30, 2015 10:39
@what-the-diff
Copy link

what-the-diff bot commented Jul 22, 2023

PR Summary

  • Improved Data Handling in Table.php
    The setRows function in the Table.php file now handles empty and non-numeric values better. If a data slot is empty or contains non-numeric data, it gets replaced with a space. Also, if the data slot contains an array, it gets converted into series of values, making it easier to preview.

  • Updated Test Cases in TableTest.php
    The testLists function in TableTest.php now includes new test scenarios reflecting above changes. It includes one additional test row with an array value. Also, the expected output has been updated according to these changes. For instance, the first column of the new row appears as "• col1" to improve visibility.

@rhertogh rhertogh marked this pull request as ready for review July 22, 2023 13:16
@codecov
Copy link

codecov bot commented Jul 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +32.64 🎉

Comparison is base (1a0e91e) 16.21% compared to head (acc98a2) 48.86%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #19908       +/-   ##
===========================================
+ Coverage   16.21%   48.86%   +32.64%     
===========================================
  Files         445      445               
  Lines       41121    42785     +1664     
===========================================
+ Hits         6668    20905    +14237     
+ Misses      34453    21880    -12573     
Impacted Files Coverage Δ
framework/console/widgets/Table.php 72.27% <100.00%> (+72.27%) ⬆️

... and 294 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@samdark samdark requested review from a team July 24, 2023 06:57
@rhertogh rhertogh requested review from bizley and Arhell August 6, 2023 17:48
@bizley bizley merged commit 84c15dc into yiisoft:master Aug 9, 2023
49 checks passed
@bizley
Copy link
Member

bizley commented Aug 9, 2023

👍🏻

@bizley bizley added this to the 2.0.49 milestone Aug 9, 2023
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.

4 participants