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

Allow clickable links in table rows #428

Closed
mturoci opened this issue Dec 21, 2020 · 8 comments · Fixed by #1321
Closed

Allow clickable links in table rows #428

mturoci opened this issue Dec 21, 2020 · 8 comments · Fixed by #1321
Assignees
Labels
feature Feature request ui Related to UI

Comments

@mturoci
Copy link
Collaborator

mturoci commented Dec 21, 2020

via @vopani

Is your feature request related to a problem? Please describe

It helps improving a base UX to render urls directly as links thus making them clickable as opposed to plaintext that user has to manually copy and paste to browser url bar.

Describe the solution you'd like

We have 2 options here:

  • Auto detect if the plaintext is a link and render anchor tag correspondingly.
  • Provide a data_type: 'link' and render accordingly.
  • Add additional TableCellType - LinkTableCellType

Additional context

We already have a link attribute on TableColumnType that specifies the primary clickable column and might cause confusion so we need to be careful about naming.

cc @lo5 @geomodular for discussion

@mturoci mturoci added ui Related to UI feature Feature request labels Dec 21, 2020
@mturoci
Copy link
Collaborator Author

mturoci commented Jan 18, 2021

As suggested by @mneuhaus in our Discourse, one possible solution would be to allow markdown as table cell content (instead of plain string). This would also add additional text formatting flexibility if needed.

@sergiomora03
Copy link
Contributor

But if we use that, we couldn't use ui.progress_table_cell_type(), right?

@mturoci
Copy link
Collaborator Author

mturoci commented Jan 19, 2021

Why not? This proposal would only enhance existing string column capabilities with markdown. If you specify cell_type as ui.progress_table_cell_type() for example, you get the desired progress instead of string like it is now.

@lo5
Copy link
Member

lo5 commented Jan 19, 2021

One aspect we need to consider before doing this is to make our markdown-to-HTML conversion a bit smarter. It currently wraps all text in <p></p> which would introduce unwanted whitespace inside table cells, so it would be good to handle some special cases at the markdown level (e.g. unwrap single-lines, etc.) instead of attempting a post-fix in the table's CSS.

@mturoci
Copy link
Collaborator Author

mturoci commented Sep 22, 2021

On second thought, enabling link support via our existing ui.link probably makes more sense as markdown links are quite limited and only support opening links in current tab which would not satisfy #567. Using ui.link would also allow downloads which may be a common scenario in a lot of apps.

@UK-17
Copy link

UK-17 commented Feb 4, 2022

Any update on this ? I was making a JIRA issue tracker table using ui.table
It would be really helpful if links are allowed and i can redirect each row to its jira page.

@mturoci
Copy link
Collaborator Author

mturoci commented Feb 4, 2022

We will try to include it within the next release.

@aalencar aalencar self-assigned this Mar 15, 2022
aalencar added a commit that referenced this issue Apr 1, 2022
aalencar added a commit that referenced this issue Apr 1, 2022
@aalencar aalencar linked a pull request Apr 1, 2022 that will close this issue
aalencar added a commit that referenced this issue Apr 11, 2022
aalencar added a commit that referenced this issue Apr 12, 2022
* rename overlook references to new_tab and url
* fix docs example code (showcase)
* move LinkTableCellType component to link_table_cell_type.tsx
* improve reference to links that include 'http(s)', page -> webpage
* improve regex to extract label and link

closes #428
aalencar added a commit that referenced this issue Apr 12, 2022
* rename overlook references to new_tab and url
* fix docs example code (showcase)
* move LinkTableCellType component to link_table_cell_type.tsx
* improve reference to links that include 'http(s)', page -> webpage
* improve regex to extract label and link

closes #428
@mturoci
Copy link
Collaborator Author

mturoci commented Apr 22, 2022

Related #1379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request ui Related to UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants