pandas icon indicating copy to clipboard operation
pandas copied to clipboard

Fix Excel-specific border styles

Open tehunter opened this issue 3 years ago • 1 comments
trafficstars

  • [X] closes #48649
  • [X] Tests added and passed if fixing a bug or adding a new feature
  • [X] All code checks passed.
  • [X] ~Added type annotations to new arguments/methods/functions.~
  • [X] Added an entry in the latest doc/source/whatsnew/v1.5.1.rst file if fixing a bug or adding a new feature.

Fixes Excel-specific border styles and modifies behavior when border-style provided without a border-color to match CSS behavior (i.e., defaults to black)

tehunter avatar Sep 20 '22 16:09 tehunter

Let me know if the behavior change for unspecified colors is too much for a minor version. The new behavior matches CSS behavior so it follows the more expected behavior and will have more consistency between styler.to_html() and styler.to_excel() results.

tehunter avatar Sep 20 '22 16:09 tehunter

@tehunter this is a good PR, what do we need to finalise it?

attack68 avatar Nov 02 '22 15:11 attack68

I think it's good to go. Let me merge in the latest from main and move the whatsnew entries

tehunter avatar Nov 02 '22 15:11 tehunter

Caught and fixed a bug when using these styles in the border shorthand (e.g. border-left: black 1px mediumDashDot). I think it's good to go now @attack68

tehunter avatar Nov 10 '22 19:11 tehunter

looks good, can you merge main

attack68 avatar Nov 11 '22 23:11 attack68

@attack68 main merged and tests pass

tehunter avatar Nov 14 '22 18:11 tehunter

@rhshadrach merging is blocked here. are we missing unaddressed requests?

also is the pull request reflecting the right branch. im not up to speed with current 2.0 or 1.5.2 route?

attack68 avatar Nov 14 '22 19:11 attack68

@rhshadrach merging is blocked here. are we missing unaddressed requests?

Thanks for the ping - I've dismissed my stale review as the changes were made, so it's no longer blocking.

also is the pull request reflecting the right branch. im not up to speed with current 2.0 or 1.5.2 route?

In either case, we'll merge into main first and then backport if it should go into 1.5.2. As long as it's tagged with the 1.5.2 milestone, the backport will be attempted by meeseeks. The discussion of which to do is here: https://github.com/pandas-dev/pandas/pull/48660#discussion_r976829256

rhshadrach avatar Nov 15 '22 02:11 rhshadrach

@mroeschke are you ok with this? If so I think its OK to merge.

attack68 avatar Nov 16 '22 08:11 attack68

It seems 1.5.2 si ready for release, this seems to have been pushed to 1.5.3, can you update the whatrs new

attack68 avatar Nov 16 '22 14:11 attack68

@attack68 Merged from main and moved the whatsnew entry to 1.5.3. It should be good to go assuming tests pass

tehunter avatar Nov 23 '22 15:11 tehunter

@mroeschke you happy also if we merge this?

attack68 avatar Nov 23 '22 15:11 attack68

Sorry for the delay on my end, thanks @tehunter for sticking with it

mroeschke avatar Nov 29 '22 02:11 mroeschke

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 1.5.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 d52b6b334677aad76334b5246ce26728156c0d70
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #48660: Fix Excel-specific border styles'
  1. Push to a named branch:
git push YOURFORK 1.5.x:auto-backport-of-pr-48660-on-1.5.x
  1. Create a PR against branch 1.5.x, I would have named this PR:

"Backport PR #48660 on branch 1.5.x (Fix Excel-specific border styles)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

lumberbot-app[bot] avatar Nov 29 '22 02:11 lumberbot-app[bot]

@tehunter or @attack68 do either of you have availability to follow the back porting instructions above?

mroeschke avatar Nov 29 '22 17:11 mroeschke

#50204

attack68 avatar Dec 12 '22 16:12 attack68