In the visible-columns list, we have a concept of "self-link". The defined column directive should display a rowname and link to the current row. This is mainly useful in the recordset page where we want to have an alternative linkable target to the "view details" button.
This can be achieved by defining the key's constraint name using the old syntax. For example, if we have the following keys definition:
Then using ["schema", "key_constraint"] will show the self-link. The same thing can be achieved by defining a source like this:
{"source": "name", "self_link": true}
While this works, it's more limited than the old syntax:
You cannot refer to a specific key if multiple keys are based on the same column.
It doesn't support composite keys.
Therefore, we should see if we can develop a better syntax. And as a result, see if we want to deprecate the syntax entirely.
This came up when we talked about the possibility of changing these column directives' behavior in here.
The following are the other things that came up:
Shouldn't the explicit visible column syntax be able to say "use this pattern to get the anchor text" and "use this constraint for the record identity" and fully configure it, but then heuristics might be able to choose row-name and shortest key for these two purposes
If we can access the current rowname and URL the way it's described here, we should be able to mimic the same behavior as a "self-link". And then we might not need the customized "self-link" behavior of the source syntax.
What about customizing the sort behavior?
In regards to old syntax vs. general syntax:
We ought to think in terms of deprecating some of the old syntax, and just implement it in interim however is easiest.
the more general syntax ought to be simple to use to explicitly ask for the heuristic behavior while overriding it piecemeal.
If the most general column directive syntax is now powerful enough, we shouldn't need to keep having so many other magic special syntax either.
We should add any other issues/changes regarding self-link here.
In the
visible-columns
list, we have a concept of "self-link". The defined column directive should display a rowname and link to the current row. This is mainly useful in the recordset page where we want to have an alternative linkable target to the "view details" button.This can be achieved by defining the key's constraint name using the old syntax. For example, if we have the following
keys
definition:Then using
["schema", "key_constraint"]
will show the self-link. The same thing can be achieved by defining a source like this:While this works, it's more limited than the old syntax:
Therefore, we should see if we can develop a better syntax. And as a result, see if we want to deprecate the syntax entirely.
This came up when we talked about the possibility of changing these column directives' behavior in here.
The following are the other things that came up:
We should add any other issues/changes regarding self-link here.