question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow custom edit/view links in CatalogTable rows

See original GitHub issue

Feature Suggestion

The catalog table includes edit and view links. Make these customisable on a per location basis.

Possible Implementation

This could be added to the various schemas for locations, in app-config.yaml for example:

locations:
  - type: url
    target: https://github.com/example/example/blob/master/catalog-info.yaml
    editUrl: https://github.com/example/example/edit/master/catalog/index.jsonnet

The explicit URLs would then override the link builder functions in the catalog plugin.

export const createEditLink = (location: LocationSpec): string | undefined => {
  if (location.editUrl) return location.editUrl;
  // ... existing implementation goes here ... 
}

Context

The current implementation works reliably if:

  1. You are using one of the supported Git providers to store your catalog manifests
  2. The YAML file itself is the source of truth, ie, it is not generated from other source files

If the first condition is not true, then edit/view links may or may not take the user to the right place. For example, we have a custom catalog processor that reads from a GCS bucket, and in that case the links take you to a browser-unfriendly gs:// url.

If the second condition is not true, then you may inadvertently send users to edit generated files, which is not ideal.

Allowing customisation would prevent these problems. Doing it per location would seem to be the best idea since these links are tied to the particular implementation of the location’s target.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
tragiclifestoriescommented, Feb 9, 2021

I’ve been meaning to make an RFC for supporting cloud storage providers - there was a slightly frosty reception for the idea in Discord but I think it’s probably worth discussing more elsewhere.

I take the point that allowing the link builders to be replaced would be a possible alternative implementation - I just wrote down the first one that came to me. It also occurs to me that I often wish that a particular link or button did something slightly different and so it might be worth coming up with a mechanism for these things that is ‘generalisable’ in some sense.

0reactions
frebencommented, Feb 13, 2021

Also it could be a decent convention to put the yaml files where the actual module is instead of in the root. And then you could register a glob url to capture them all in one go!

<...>/**/catalog-info.yaml

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow multi-line in EditText view in Android? - Stack Overflow
By default all the EditText widgets in Android are multi-lined. Here is some sample code: <EditText android:inputType="textMultiLine" <!
Read more >
Define Criteria for a Feature's Page Layout - Oracle Help Center
Creating criteria enables you to define a set of conditions that have to be met before the page layout is displayed for a...
Read more >
Working with the EditText | CodePath Android Cliffnotes
The EditText is the standard text entry widget in Android apps. If the user needs to enter text into an app, this is...
Read more >
Installing and Managing QMF for Workstation and QMF ... - IBM
Enabling bidirectional text layout transformations for DB2 Type 4 UDB JDBC driver. ... sources for which you want to bind packages in the...
Read more >
Working with views - Amazon Athena - AWS Documentation
Shows the list of columns for the named view. This allows you to examine the attributes of a complex view. DROP VIEW. Deletes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found