-
Notifications
You must be signed in to change notification settings - Fork 234
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
fix: move slack channel to top of table description #1446
Conversation
const channelsKey = 'channels'; | ||
const channelsValue = customProperties[channelsKey]?.toString() ?? ''; | ||
const channelsName = channelsValue.slice(1); | ||
const channelLink = `https://pinterest.slack.com/app_redirect?channel=${channelsName}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is too Pinterest specific for the opensource repo and need a better solution for it. let's not add a link for now. maybe can add link in the properties when syncing from pincat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed link for now
function createChannelLinkDOM(customProperties) { | ||
const channelsKey = 'channels'; | ||
const channelsValue = customProperties[channelsKey]?.toString() ?? ''; | ||
|
||
return channelsValue === '' ? null : ( | ||
<KeyContentDisplay | ||
key={channelsKey} | ||
keyString={titleize(channelsKey, '_', ' ')} | ||
> | ||
{channelsValue} | ||
</KeyContentDisplay> | ||
); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is duplicating a lot of code specially for channels, could you have something like:
/**
* any custom properties in this array will be shown on top following the order of the array
*/
const pinnedCustomProperties = ['channels'];
then when you go over customPropertiesDOM, make orderedProperties show at the beginning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Refactored KeyContentDisplay to helper
- Added
pinnedCustomProperties[]
to display pinned custom properties at top and unpinned custom properties at bottom - Updated test plan with screenshots
querybook/webapp/components/DataTableViewOverview/DataTableViewOverview.tsx
Outdated
Show resolved
Hide resolved
querybook/webapp/components/DataTableViewOverview/DataTableViewOverview.tsx
Outdated
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏 , let's fix the errors before r+
Minor Querybook Improvements for Tier 1 tables
Test Plan
Bring slack channel to top of table details and add channel link