You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the view command could benefit from being modeled less closely after the build command. In the current design, it is envisioned that view should take styles just as build, but I wonder if that design choice is limiting how we think of the view command.
For build a large reason for different styles is to choose how content is displayed to readers of a website; these readers have no possibility to change the style the metadata is displayed in, they just interact with the page that the designer created. So depending on the audience and the data package content, the designer can choose which style they think will be the most effective.
For view the audience will be the person typing the command in the terminal and there is no need to tailor the output to specific target audience. The content of the data package might still have some impact no how one would like to display it, but more importantly I think that someone using it from the terminal wants an effective way to explore the metadata rather than just different static viewing styles.
While I have been thinking about this for a while, I was sprung to write this issue after getting some first hand experience trying out flower with on-limit's feasibility metadata as mentioned in #327. There are many tables with so many fields that outputting it into stdout in terminal makes it unusable. Piping it to a pager helps and adds some search etc, but it is still too basic as it doesn't allow to easily search for fields across tables, see the existing resource, etc.
Currently, putting the metadata from a large datapackage on a webpage via build offers a better experience for exploration than trying to use view in a terminal. But it doesn't seem reasonable to require someone to build a web-page every time they want to explore the metadata from a large data package; especially for those personas that are more technical and likely to work with the metadata more extensively for their own discovery process rather than for the purpose of presenting it to an audience (e.g. me understanding how the metadata is structured in the onlimit feasibility study). I think what we want is a terminal user interface (TUI) that allows for more complex metadata exploration. At least that is what I would want for exploring metadata myself =) And aligning with the seedcase motto of that we are our own first customers, I built one. Here is a demo, and there is a PR of a more minimal implementation in #331
recording-2026-05-06_14.35.29.mp4
Some discussion questions:
Do you think this TUI would be a useful addition in flower?
Should this tui be the default (or even only) output for viewing metadata in the terminal?
I have been thinking about whether we should also support stdout (as currently) and/or pager. My first thoughts are that stdout could still be useful if someone want to pipe the output elsewhere, but a specific pager output might not be required (the stdout could just be piped to the pager if desired and I'm not sure how buil-in pager would support look crossplatform).
Do we want to deprecate the use of styles with view?
With the background of how I think view could be more useful, I'm struggling to imagine any use cases for styles in the terminal. We only have one style currently and it seems more relevant to be able to filter what metadata fields are included rather than how it is "styled" (and that is a job for a potential query language as per Some querying features would be nice in view #259). Implementing the TUI does not depend on removing styles, but unless there are any envisioned use cases I think we can remove them to avoid confusion around what they do and how they interact with e.g. the TUI.
In the browser, the main use case we have so far for styles is whether resources are shown on separate pages or all on one page. In the terminal this would be the difference of either outputting everything to stdout ("one page") or to the TUI. Supporting different styles within the TUI might be possible, but I can't envision the benefit here as I'm thinking that the TUI is more centered about a functional workflow than a specific presentation style of the content.
I experimented briefly with multipage styles in the pager by adding horizontal lines as page delimiters, but it isn't really a big difference from not having them and I think we could just always include them in the stdout output.
I also experimented with different styles in the TUI, but didn't experience any benefit and it is more performant to skip the markdown conversion and display and using built in DataTables etc instead of markdown tables, so we would need to support a different type of style for the terminal if we want them.
Another option would be to keep view as is and instead introduce a new explore command or similar with the Tui functionality. But I'm leaning towards that we don't need both...
I think the
viewcommand could benefit from being modeled less closely after thebuildcommand. In the current design, it is envisioned thatviewshould take styles just asbuild, but I wonder if that design choice is limiting how we think of theviewcommand.For
builda large reason for different styles is to choose how content is displayed to readers of a website; these readers have no possibility to change the style the metadata is displayed in, they just interact with the page that the designer created. So depending on the audience and the data package content, the designer can choose which style they think will be the most effective.For
viewthe audience will be the person typing the command in the terminal and there is no need to tailor the output to specific target audience. The content of the data package might still have some impact no how one would like to display it, but more importantly I think that someone using it from the terminal wants an effective way to explore the metadata rather than just different static viewing styles.While I have been thinking about this for a while, I was sprung to write this issue after getting some first hand experience trying out flower with on-limit's feasibility metadata as mentioned in #327. There are many tables with so many fields that outputting it into stdout in terminal makes it unusable. Piping it to a pager helps and adds some search etc, but it is still too basic as it doesn't allow to easily search for fields across tables, see the existing resource, etc.
Currently, putting the metadata from a large datapackage on a webpage via
buildoffers a better experience for exploration than trying to useviewin a terminal. But it doesn't seem reasonable to require someone to build a web-page every time they want to explore the metadata from a large data package; especially for those personas that are more technical and likely to work with the metadata more extensively for their own discovery process rather than for the purpose of presenting it to an audience (e.g. me understanding how the metadata is structured in the onlimit feasibility study). I think what we want is a terminal user interface (TUI) that allows for more complex metadata exploration. At least that is what I would want for exploring metadata myself =) And aligning with the seedcase motto of that we are our own first customers, I built one. Here is a demo, and there is a PR of a more minimal implementation in #331recording-2026-05-06_14.35.29.mp4
Some discussion questions:
view?viewcould be more useful, I'm struggling to imagine any use cases for styles in the terminal. We only have one style currently and it seems more relevant to be able to filter what metadata fields are included rather than how it is "styled" (and that is a job for a potential query language as per Some querying features would be nice inview#259). Implementing the TUI does not depend on removing styles, but unless there are any envisioned use cases I think we can remove them to avoid confusion around what they do and how they interact with e.g. the TUI.viewas is and instead introduce a newexplorecommand or similar with the Tui functionality. But I'm leaning towards that we don't need both...