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

Refactor to create base classes for table columns that display text #1239

Merged
merged 26 commits into from
May 12, 2023

Conversation

jattasNI
Copy link
Contributor

@jattasNI jattasNI commented May 11, 2023

Pull Request

🤨 Rationale

As part of the vision described in #1224 in service of #1011 and other column types, we will want to share rendering logic across columns that display their data as text. This could eventually include:

  • the existing text column
  • the mapping column discussed in Mapping table column spec #1220
  • columns that display numbers, dates, elapsed time, and more
  • columns defined in applications with custom formatting logic

👩‍💻 Implementation

  1. Extract abstract base classes, templates, and styles from the existing text column for:
    • the column custom element
    • the cell view custom element
    • the group header custom element
      These live in table-column/text-base.
  2. Derive concrete instances and register custom elements of each of these for the text column
  3. Define and use some table field types to provide stricter typing some generic parameters

🧪 Testing

Relying on existing tests.

We have a future task to add docs/examples/tests for applications deriving from these base classes.

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@jattasNI jattasNI changed the title Refactor to create base class for table columns that display text Refactor to create base classes for table columns that display text May 11, 2023
@jattasNI jattasNI requested a review from atmgrifter00 May 11, 2023 14:37
@jattasNI jattasNI marked this pull request as ready for review May 11, 2023 14:37
@jattasNI jattasNI requested a review from rajsite as a code owner May 11, 2023 14:37
@jattasNI jattasNI requested a review from rajsite May 12, 2023 22:57
@rajsite rajsite enabled auto-merge (squash) May 12, 2023 23:11
@rajsite rajsite merged commit c00161d into main May 12, 2023
@rajsite rajsite deleted the users/jattas/formatted-text-column branch May 12, 2023 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants