diff --git a/addon/components/hyper-table-v2/column.ts b/addon/components/hyper-table-v2/column.ts index 6e8350ab..660ffe1d 100644 --- a/addon/components/hyper-table-v2/column.ts +++ b/addon/components/hyper-table-v2/column.ts @@ -94,7 +94,7 @@ export default class HyperTableV2Column extends Component { diff --git a/addon/helpers/custom-format-number.js b/addon/helpers/custom-format-number.js index 052f0691..5771f3b7 100644 --- a/addon/helpers/custom-format-number.js +++ b/addon/helpers/custom-format-number.js @@ -1,6 +1,6 @@ import { helper } from '@ember/component/helper'; -var formats = [ +const formats = [ { value: 1e3, sym: 'k' @@ -16,13 +16,13 @@ var formats = [ ]; export function customFormatNumber(params) { - var number = params[0]; + const number = params[0]; if (number === null || number === undefined || isNaN(number)) { return '-'; } - var format = formats + const format = formats .filter((format) => { return format.value < number; }) diff --git a/app/styles/columns.less b/app/styles/columns.less index 69644350..cced5f46 100644 --- a/app/styles/columns.less +++ b/app/styles/columns.less @@ -40,6 +40,10 @@ position: sticky; right: 0; z-index: 20; + + header { + cursor: pointer; + } } // Animate Columns Drag & Drop @@ -81,7 +85,7 @@ transition: all 0.25s ease-in-out; - & > .cell-header { + &>.cell-header { color: var(--color-gray-600); font-size: 16 / @rem; font-weight: var(--font-weight-semibold); @@ -153,12 +157,6 @@ } } -.hypertable__column--sticky-right { - header { - cursor: pointer; - } -} - .hypertable__column--selection { width: 40px; min-width: 40px; @@ -235,6 +233,7 @@ } .hypertable__column--text .hypertable__cell { + .editing-input, .text-value { display: -webkit-box; @@ -245,7 +244,7 @@ } .hypertable__column--list .hypertable__cell { - & > div:first-child { + &>div:first-child { width: 100%; } @@ -259,7 +258,7 @@ display: flex; align-items: center; - & > div:nth-child(2) { + &>div:nth-child(2) { margin-left: var(--spacing-px-12); span { @@ -329,15 +328,17 @@ 10% { opacity: 1; } + 99% { opacity: 1; max-height: 500px; overflow: hidden; } + 100% { opacity: 1; max-height: 500px; overflow: auto; } } -} +} \ No newline at end of file diff --git a/app/styles/header.less b/app/styles/header.less index c2022628..7bb17095 100644 --- a/app/styles/header.less +++ b/app/styles/header.less @@ -30,20 +30,18 @@ .left-side { display: flex; flex-grow: 1; - } - /* - * Search - * ====== - * - */ - .left-side { input { max-width: 250px; min-width: 100px; } } + /* + * Search + * ====== + * + */ .left-side .selected-count { background-color: var(--color-gray-400); border-radius: var(--border-radius-sm); @@ -185,6 +183,7 @@ from { transform: scale(0); } + to { transform: scale(1); } @@ -194,6 +193,7 @@ 0% { transform: scale(1); } + 100% { transform: scale(0); } @@ -284,4 +284,4 @@ } } } -} +} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index eee0ac78..313a85ca 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,7 +4,7 @@ sonar.organization=upfluence sonar.sources=addon/,app/ sonar.javascript.lcov.reportPaths=./coverage/lcov.info sonar.typescript.tsconfigPaths=./tsconfig.json -sonar.coverage.exclusions=app/ -sonar.cpd.exclusions=tests/,**/tests/**,*-test.js,*-test.ts,test-support/ +sonar.coverage.exclusions=app/**,addon/components/hyper-table/**,addon/mixins/**,addon/types/**,addon/utils/** +sonar.cpd.exclusions=app/**,tests/**,**/tests/**,*-test.js,*-test.ts,test-support/ sonar.tests=tests/ sonar.html.file.suffixes=.hbs diff --git a/tests/integration/components/hyper-table/cell-renderers/image-test.js b/tests/integration/components/hyper-table/cell-renderers/image-test.js index 703029f5..0e5ef1dc 100644 --- a/tests/integration/components/hyper-table/cell-renderers/image-test.js +++ b/tests/integration/components/hyper-table/cell-renderers/image-test.js @@ -7,17 +7,19 @@ module('Integration | Component | hyper-table/cell-renderers/image', function (h setupRenderingTest(hooks); test('it renders', async function (assert) { - this.item = { imageURL: 'foo.png', name: 'FooBar' }; + this.item = { imageURL: '/@upfluence/hypertable/assets/images/empty-state.png', name: 'FooBar' }; this.column = { key: 'imageURL', labels: ['name'] }; await render(hbs``); - assert.dom('.upf-avatar.upf-avatar--sm img').hasAttribute('src', 'foo.png'); + assert + .dom('.upf-avatar.upf-avatar--sm img') + .hasAttribute('src', '/@upfluence/hypertable/assets/images/empty-state.png'); }); module('it has labels to show', function () { test('it should display the labels next to the image', async function (assert) { - this.item = { imageURL: 'foo.png', name: 'FooBar' }; + this.item = { imageURL: '/@upfluence/hypertable/assets/images/empty-state.png', name: 'FooBar' }; this.column = { key: 'imageURL', labels: ['name'] }; await render(hbs``); @@ -30,7 +32,11 @@ module('Integration | Component | hyper-table/cell-renderers/image', function (h module('there is a notification on the item', function () { test('it should display the notification dot next to the labels', async function (assert) { - this.item = { imageURL: 'foo.png', name: 'FooBar', hasNotifications: true }; + this.item = { + imageURL: '/@upfluence/hypertable/assets/images/empty-state.png', + name: 'FooBar', + hasNotifications: true + }; this.column = { key: 'imageURL', labels: ['name'] }; await render(hbs``);