Skip to content

Conversation

@strickvl
Copy link
Contributor

@strickvl strickvl commented May 9, 2022

Describe changes

I've solved the issue were rich was shortening text inside tables. Also, the text of almost all the contents of these tables should now be accessible as a 'link', so if your terminal supports in-terminal links (by holding down CTRL or CMD, i.e.) then users will be able to do that to copy the text inside a specific cell.

The one caveat that doesn't work right now is when a cell's text contains a space. So far, the two things this affects is JSON values and path values coming from Mac or Windows environments (both of which often have spaces). It wouldn't be trivial to solve and for those two specific items there isn't a great deal lost in not being able to click-select them as a link. They will still all be visible and behave like the rest of the tables in terms of wrapping as columns.

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • If I have added an integration, I have updated the integrations table.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@strickvl strickvl added enhancement New feature or request internal To filter out internal PRs and issues labels May 9, 2022
@strickvl strickvl requested review from htahir1 and schustmi May 9, 2022 18:58
@htahir1
Copy link
Contributor

htahir1 commented May 10, 2022

I still get this when I use the branch on Windows WSL. I am unable to click using the new Windows Terminal application, even though im sure its capable to support link clicks

image

@strickvl strickvl removed request for htahir1 and schustmi May 10, 2022 11:26
@strickvl strickvl requested review from htahir1 and schustmi May 10, 2022 14:42
@strickvl
Copy link
Contributor Author

@htahir1 you're totally right. That was the one CLI command I hadn't addressed. I also took the opportunity to handle where tests were failing in the case when a dependency list has spaces or the [ or ] characters (which rich didn't like).

@htahir1
Copy link
Contributor

htahir1 commented May 10, 2022

@strickvl Cool!
image

Ok now it seems to work but Cntrl+Copy on the links gives me this error.. I think that interpreting these as links does not really make sense as then the terminal wants to open it as a link in the browser

@strickvl
Copy link
Contributor Author

@htahir1 It's the only way to allow users to access the details of a cell when it wraps to a new line, unfortunately. I found that CTRL-clicking and copying, and then pasting it, worked for me.

Happy to brainstorm other suggestions, but this seems to be the only way with rich.

Copy link
Contributor

@htahir1 htahir1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, actually im happy with this one. LGTM!

Copy link
Contributor

@schustmi schustmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@strickvl strickvl merged commit 217392f into develop May 12, 2022
@strickvl strickvl deleted the feature/ENG-769-rich-displays-full-text branch May 12, 2022 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request internal To filter out internal PRs and issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants