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

Hidden fields #830

Open
dmpetrov opened this issue Jan 19, 2025 · 0 comments
Open

Hidden fields #830

dmpetrov opened this issue Jan 19, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dmpetrov
Copy link
Member

Description

Users usually only need to see basic fields like path, size and etag when viewing File. We should hide other fields by default to reduce UI clutter, while keeping them accessible when needed.

We need a way to mark rarely used fields as "internal" in our data model.

Example:

class File(DataModel):
    """`DataModel` for reading binary files."""

    source: str = Field(default="", hidden=True)
    path: str
    size: int = Field(default=0)
    version: str = Field(default="", hidden=True)
    etag: str = Field(default="")

Note, it should be general approach. User should be able to have hidden fields in their classes.

Open question:

  • Should size be hidden? Likely yes.
  • etag should be visible (to emphasise the consistency and see changes). It looks like it needs to be moved next to path (before size and version).
@dmpetrov dmpetrov added the enhancement New feature or request label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant