plotly.rs icon indicating copy to clipboard operation
plotly.rs copied to clipboard

Add From<String> impl for Title

Open fsktom opened this issue 2 years ago • 4 comments
trafficstars

A small quality of life improvement

So that instead of doing

let layout = Layout::new().title(format!("<b>{title}</b>").as_str().into());

I can now do

let layout = Layout::new().title(format!("<b>{title}</b>").into());

fsktom avatar Jul 27 '23 23:07 fsktom

This is even better! Thanks @mfreeborn :)

 let layout = Layout::new().title(format!("<b>{title}</b>"));

is even cleaner now :D

fsktom avatar Aug 08 '23 15:08 fsktom

I'm going to go ahead and try to fix the failing examples etc. if that's alright with you

fsktom avatar Aug 08 '23 16:08 fsktom

Yes, start going for it by all means! I ran out of time updating the remaining examples etc last night. I also intend to give LegendGroupTitle the same treatment, which we might as well do in this PR.


From: Filip T @.> Sent: Tuesday, August 8, 2023 5:48:05 PM To: igiagkiozis/plotly @.> Cc: Michael Freeborn @.>; Mention @.> Subject: Re: [igiagkiozis/plotly] Add From<String> impl for Title (PR #154)

I'm going to go ahead and try to fix the failing examples etc. if that's alright with you

— Reply to this email directly, view it on GitHubhttps://github.com/igiagkiozis/plotly/pull/154#issuecomment-1669969290, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHSVKWHCCN2XMTBK3FYCUPDXUJUULANCNFSM6AAAAAA22XQOCE. You are receiving this because you were mentioned.Message ID: @.***>

mfreeborn avatar Aug 08 '23 17:08 mfreeborn

@mfreeborn I tried improving LegendGroupTitle similarly to Title in 3feaa0c4ea60a1351ff42ff858e91b96457d4a00 Seemed to work fine, but I'm not sure if I did everything correctly

What do you think?

fsktom avatar Aug 09 '23 20:08 fsktom

Glad to see the development of this project continuing <3

Decided to sync the changes of this PR with the main branch and adjust some things. Let me know what you think

fsktom avatar Jun 23 '24 02:06 fsktom

Seems like I missed some things... Now the clippy tests shouldn't fail

fsktom avatar Jun 23 '24 12:06 fsktom

Glad to see the development of this project continuing <3

Decided to sync the changes of this PR with the main branch and adjust some things. Let me know what you think

Thanks for updating. Will have a look

andrei-ng avatar Jun 23 '24 12:06 andrei-ng

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.74%. Comparing base (4815df7) to head (0ea64ff). Report is 3 commits behind head on main.

:exclamation: Current head 0ea64ff differs from pull request most recent head e5d03ab

Please upload reports for the commit e5d03ab to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #154      +/-   ##
==========================================
+ Coverage   93.61%   94.74%   +1.13%     
==========================================
  Files          27       28       +1     
  Lines        7153     7283     +130     
==========================================
+ Hits         6696     6900     +204     
+ Misses        457      383      -74     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 23 '24 12:06 codecov[bot]

@fsktom, thank you for fixing all the tests and clippy. I've just merged it.

andrei-ng avatar Jun 25 '24 21:06 andrei-ng

Thank you so much! :D

fsktom avatar Jun 25 '24 21:06 fsktom