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

feat: table: Add loc support and column, cell css vertical alignment prop #394

Conversation

dkilgore-eightfold
Copy link
Contributor

@dkilgore-eightfold dkilgore-eightfold commented Sep 28, 2022

SUMMARY:

Adds loc support to Table whilst preserving custom strings via props
Adds verticalAlign prop to Column and Cell

GITHUB ISSUE (Open Source Contributors)

#374

JIRA TASK (Eightfold Employees Only):

ENG-30680

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

Pull the pr branch and do yarn, then yarn storybook, verify the Table stories behave as expected.

Set the Table locale to another language and test the sort tooltip as follows (pseudo-code):

import { zhCN } from "@eightfold.ai/octuple/";
<Table locale={zhCN} triggerAscText={'foo'} />

The ascending tooltip text should read 'foo' and the others should use the loc defaults

Test the column/cell vertical alignment as follows (pseudo-code):

const cols = [
    {
        title: 'Role',
        dataIndex: 'title',
        verticalAlign: 'top'
    },
    {
        title: 'Level',
        dataIndex: 'level',
        verticalAlign: 'bottom'
    },
]

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 28, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 28a560b:

Sandbox Source
React Configuration
Vanilla Configuration

src/components/Table/Table.tsx Outdated Show resolved Hide resolved
@dkilgore-eightfold dkilgore-eightfold merged commit e0045e3 into EightfoldAI:main Sep 28, 2022
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.

2 participants