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

fix(sqllab): Handle long table names in SQL Lab #10518

Merged
merged 7 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions superset-frontend/src/SqlLab/components/AceEditorWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import 'brace/mode/sql';
import 'brace/theme/github';
import 'brace/ext/language_tools';
import ace from 'brace';
import { areArraysShallowEqual } from '../../reduxUtils';
import sqlKeywords from '../utils/sqlKeywords';
import { areArraysShallowEqual } from 'src/reduxUtils';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this from a lint rule? auto modifications from your IDE? Could we do a programmatic migration here to absolute paths everywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably could do that, but I'm not sure it's worth it. I think I made a decision to change it here because it made more sense than a local path. But sometimes local paths are nice.

import sqlKeywords from 'src/SqlLab/utils/sqlKeywords';
import {
SCHEMA_AUTOCOMPLETE_SCORE,
TABLE_AUTOCOMPLETE_SCORE,
COLUMN_AUTOCOMPLETE_SCORE,
SQL_FUNCTIONS_AUTOCOMPLETE_SCORE,
} from '../constants';
} from 'src/SqlLab/constants';

const langTools = ace.acequire('ace/ext/language_tools');

Expand Down
4 changes: 4 additions & 0 deletions superset-frontend/src/SqlLab/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ div.tablePopover {
border: 1px solid @gray-light;
font-feature-settings: @font-feature-settings;
font-family: @font-family-monospace;

&.ace_autocomplete {
width: 520px;
}
}

.Select__menu-outer {
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/components/TableSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export default class TableSelector extends React.PureComponent {

renderDatabaseOption(db) {
return (
<span>
<span title={db.database_name}>
<Label bsStyle="default" className="m-r-5">
{db.backend}
</Label>
Expand All @@ -257,7 +257,7 @@ export default class TableSelector extends React.PureComponent {

renderTableOption(option) {
return (
<span className="TableLabel">
<span className="TableLabel" title={option.label}>
<span className="m-r-5">
<small className="text-muted">
<i
Expand Down