Skip to content

Commit

Permalink
Merge pull request #654 from beekeeper-studio/table-info-panes
Browse files Browse the repository at this point in the history
Table Properties - Read Only
  • Loading branch information
rathboma committed Jun 3, 2021
2 parents aa6cae7 + 608644f commit a06c4e0
Show file tree
Hide file tree
Showing 40 changed files with 1,669 additions and 209 deletions.
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,16 @@
},
"main": "background.js",
"dependencies": {
"@types/better-sqlite3": "^5.4.1",
"@types/dateformat": "^3.0.1",
"@types/mssql": "^6.0.8",
"@types/papaparse": "^5.2.5",
"@types/pg": "^7.14.7",
"@types/sql-formatter": "^2.3.0",
"base64-url": "^2.3.3",
"better-sqlite3": "7.1.2",
"bytes": "^3.1.0",
"cassandra-driver": "^4.4.0",
"cli-highlight": "2.0.0",
"codemirror": "^5.58.2",
"connection-string": "^3.4.2",
"core-js": "3",
"dateformat": "^3.0.3",
"dompurify": "^2.2.8",
"electron-log": "^4.2.2",
"electron-util": "^0.14.1",
"humanize-duration": "^3.23.1",
Expand All @@ -45,6 +41,7 @@
"jquery": "^3.5.0",
"knex": "^0.21.2",
"lodash": "^4.17.21",
"marked": "^2.0.3",
"material-icons": "^0.3.1",
"mkdirp": "^1.0.4",
"mssql": "^6.3.1",
Expand Down Expand Up @@ -90,14 +87,21 @@
},
"devDependencies": {
"@sentry/cli": "^1.64.0",
"@types/better-sqlite3": "^5.4.1",
"@types/bytes": "^3.1.0",
"@types/codemirror": "^0.0.97",
"@types/dateformat": "^3.0.1",
"@types/electron-devtools-installer": "^2.2.0",
"@types/javascript-time-ago": "^2.0.1",
"@types/jest": "^24.0.19",
"@types/jquery": "^3.5.1",
"@types/lodash": "^4.14.159",
"@types/mkdirp": "^1.0.1",
"@types/mssql": "^6.0.8",
"@types/node": "^12.12.54",
"@types/papaparse": "^5.2.5",
"@types/pg": "^7.14.7",
"@types/sql-formatter": "^2.3.0",
"@types/tabulator-tables": "^4.7.2",
"@typescript-eslint/eslint-plugin": "^4.1.0",
"@typescript-eslint/parser": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/styles/app/_all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
@import './connection-labels';
@import './preloader';
@import './export-modal';

@import './tabs/table-properties';
37 changes: 34 additions & 3 deletions src/assets/styles/app/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ i {
.cursor-pointer {
cursor: pointer;
}
hr {
border: 0;
border-bottom: 1px solid $border-color;
}

// Material-icons
.material-icons {
Expand Down Expand Up @@ -110,7 +114,7 @@ i {
align-items: center;
i {
font-size: 1rem;
padding-top: 1px;
margin-left: -3px;
}
}
}
Expand Down Expand Up @@ -168,6 +172,9 @@ i {
height: 24px;
line-height: 24px;
border-radius: $btn-border-radius-small;
x-label {
line-height: 24px;
}
}
.btn-block {
display: flex;
Expand Down Expand Up @@ -237,7 +244,28 @@ i {
display: flex;
flex-direction: column;
padding-top: $gutter-h;
padding-bottom: $gutter-h;
&.inline {
display: flex;
flex-direction: row;
align-items: flex-start;
> * {
display: inline-block;
padding-bottom: $gutter-h;
}
label {
padding-right: $gutter-w * 2;
text-align: right;
}
&.input {
label {
line-height: $input-height;
vertical-align: top;
}
textarea {
height: auto;
}
}
}
label {
display: flex;
align-items: center;
Expand Down Expand Up @@ -338,7 +366,7 @@ select {
box-shadow: inset 0 0 0 1px $border-color;
transition: background 0.15s ease-in-out;
&:hover {
background: rgba($theme-base, 0.025);
background: rgba($theme-base, 0.05);
}
> select {
border: 0;
Expand Down Expand Up @@ -544,6 +572,9 @@ input[type=file] {
&.settings {
color: $text-lighter;
}
// &.table-properties {
// color: $text-lighter;
// }
}

// Split.js Resizer
Expand Down
3 changes: 3 additions & 0 deletions src/assets/styles/app/connection-interface.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
.btn {
margin-left: 0.5rem;
}
.form-group {
margin-bottom: $gutter-h;
}
.has-tooltip {
color: $text-lighter;
margin-left: $gutter-h;
Expand Down
3 changes: 3 additions & 0 deletions src/assets/styles/app/core-tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
font-size: 12px;
padding-left: ($gutter-w * 0.75);
padding-right: ($gutter-h * 1.25);
max-width: $gutter-w * 3;
line-height: $tab-height;
}
.tab-action {
position: absolute;
Expand Down Expand Up @@ -299,3 +301,4 @@
}
}
}

6 changes: 5 additions & 1 deletion src/assets/styles/app/sidebar/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
color: $theme-primary;
}
}

}
}
x-menu {
Expand Down Expand Up @@ -337,10 +338,13 @@
}
}
}

&.active {
background-color: rgba($theme-base, 0.06);
}

&.selected {
background: rgba($theme-base, 0.1);
}
&.open {
// background: rgba($theme-base, 0.03);
.open-close {
Expand Down
5 changes: 3 additions & 2 deletions src/assets/styles/app/statusbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,11 @@
width: 220px;
}
.badge {
font-size: 100%;
min-width: fit-content;
background: transparent;
color: rgba(black, 0.57);
color: rgba(black, 0.87);
}
}

}
}
173 changes: 173 additions & 0 deletions src/assets/styles/app/tabs/table-properties.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@

// Table Info
.table-properties {
display: flex;
flex-direction: column;
flex-grow: 1;
padding: 0;
overflow: hidden;

h2 {
text-transform: uppercase;
font-size: 0.9em;
}
.alert-wrapper {
padding: $gutter-w;
}
.table-properties-wrap {
height: 100%;
padding: 0 1.5rem 3rem;
overflow: hidden;
overflow-y: auto;
}
.table-properties-content {
display: flex;
flex-direction: column;
margin-bottom: $gutter-w;
.card-flat {
padding: 0;
}
}
.table-subheader {
display: flex;
align-items: center;
padding: 0 $gutter-h;
margin-top: $gutter-w * 3;
margin-bottom: $gutter-w;
.table-title {
display: flex;
flex-grow: 1;
}
h2 {
margin: 0;
}
}
.tabulator {
max-height: 750px;
}

// Table Info
// --------------------------------
// Table Info Header
.table-info {
padding-top: $gutter-w * 4;
.table-name {
padding: 0 $gutter-w;
margin: 0 -$gutter-h;
margin-bottom: $gutter-h;
display: flex;
align-items: center;
.item-icon {
font-size: 1.6rem;
margin-right: $gutter-w;
}
}
.table-meta {
padding: $gutter-w;
margin: 0 -$gutter-h;
color: $text-lighter;
}
.table-description {
position: relative;
padding: $gutter-w;
margin: $gutter-h (-$gutter-h) 0;
border-radius: 3px;
cursor: pointer;
min-height: 60px;
&:hover {
background: rgba($theme-base, 0.025);
.material-icons {
display: inline-block;
}
}
&.edit-success {
background-color: green;
}
&.edit-error {
background-color: red;
}
.material-icons {
display: none;
position: absolute;
top: $gutter-h;
right: $gutter-h;
opacity: 0.58;
}
}
.table-description-edit {
position: relative;
margin-top: $gutter-w;
textarea {
min-height: 120px;
padding: $gutter-w;
padding-bottom: 3rem;
resize: vertical;
}
span.markdown {
content: 'markdown';
font-size: 10px;
color: $text-lighter;
display: inline-block;
position: absolute;
top: $gutter-h;
right: $gutter-h;
padding: 0 $gutter-h;
line-height: 1.8;
// background: rgba($theme-base, 0.1);
box-shadow: 0 0 0 1px $border-color;
border-radius: 4px;
}
}
.table-description-actions {
position: absolute;
right: $gutter-h * 1.25;
bottom: $gutter-h * 1.25;
.btn {
min-width: min-content;
}
}
}

// Table Info Content
.table-info-content {
width: 100%;
.form-group.inline {
> * {
padding-bottom: 0;
}
label {
color: $text-light;
min-width: 110px;
}
select, textarea {
min-width: 200px;
width: 100%!important;
}
select {
max-width: 220px;
}
}
textarea {
height: auto;
}
}

.table-schema {
.table-subheader {
margin-top: $gutter-w;
}
.tabulator-table {
.yesno-icon {
float:right;
}
}
}
}

.tabulator-table {
.tabulator-cell {
.null-value {
color: rgba($theme-base, 0.28);
}
}
}

0 comments on commit a06c4e0

Please sign in to comment.