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

Column list view #534

Merged
merged 16 commits into from Jun 3, 2019

Conversation

Projects
None yet
5 participants
@jenow
Copy link
Member

commented May 16, 2019

What does this PR do ?

Add a new Column list view to view document and be able to select which column we want to see.
Those column will be saved in the local storage.

column

jenow added some commits May 16, 2019

@jenow jenow self-assigned this May 16, 2019

@codecov

This comment has been minimized.

Copy link

commented May 16, 2019

Codecov Report

Merging #534 into 2-dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##            2-dev     #534   +/-   ##
=======================================
  Coverage   81.68%   81.68%           
=======================================
  Files          34       34           
  Lines         770      770           
=======================================
  Hits          629      629           
  Misses        141      141

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8703d4b...7894a5e. Read the comment docs.

@jenow jenow added the wip label May 16, 2019

@jenow jenow removed the wip label May 16, 2019

Autocomplete
},
mounted () {
const columnsConfig = JSON.parse(localStorage.getItem('columnViewConfig') || '{}')

This comment has been minimized.

Copy link
@alexandrebouthinon

alexandrebouthinon May 16, 2019

Member

I'm not sure but I think if you are in "private navigation" on your browser, it's the sessionStorage that is filled instead of localstorage. It can be good to have a fallback to sessionStorage before the empty object 🤔

This comment has been minimized.

Copy link
@jenow

jenow May 17, 2019

Author Member

It's on purpose, I want to have a brand new environment when I browse in private.

},
saveToLocalStorage() {
if (this.index && this.collection) {
const config = JSON.parse(localStorage.getItem('columnViewConfig') || '{}')

This comment has been minimized.

Copy link
@alexandrebouthinon
},
watch: {
'$route' (to, from) {
const columnsConfig = JSON.parse(localStorage.getItem('columnViewConfig') || '{}')

This comment has been minimized.

Copy link
@alexandrebouthinon

jenow and others added some commits May 17, 2019

}
},
parseDocument(attr, doc) {
let ret = attr.includes('.') ? this.getNestedField(doc.content, attr) : doc.content[attr]

This comment has been minimized.

Copy link
@scottinet

scottinet May 17, 2019

Member
Suggested change
let ret = attr.includes('.') ? this.getNestedField(doc.content, attr) : doc.content[attr]
const ret = attr.includes('.') ? this.getNestedField(doc.content, attr) : doc.content[attr]
@@ -648,7 +682,7 @@ export default {
}
}
.DocumentsPage-container {
max-width: $container-width;
// max-width: $container-width;

This comment has been minimized.

Copy link
@scottinet

scottinet May 17, 2019

Member

to be deleted?

parseDocument(attr, doc) {
let ret = attr.includes('.') ? this.getNestedField(doc.content, attr) : doc.content[attr]
if (typeof ret === 'object') {

This comment has been minimized.

Copy link
@scottinet

scottinet May 17, 2019

Member

Can ret be null? Because if it can, then a TypeError will occur because the code will try to run parseDocument on null (typeof null returns 'object')

@@ -6,7 +6,7 @@
:class="inputClass"
:placeholder="placeholder"
@input="onInput"
@change="(evt) => changeResult(evt.target.value)"
@change="evt => { if (this.notifyChange) { return changeResult(evt.target.value)}}"

This comment has been minimized.

Copy link
@thomasarbona

thomasarbona May 17, 2019

Not terrible to have so many logic in template part

@@ -68,7 +73,7 @@ export default {
},
methods: {
onInput() {
if (this.results.length > 0) {
if (this.results.length >= 0) {

This comment has been minimized.

Copy link
@thomasarbona

thomasarbona May 17, 2019

So, always true ?

@xbill82
Copy link
Member

left a comment

I hate column view

@jenow jenow requested review from thomasarbona and scottinet May 28, 2019

@thomasarbona thomasarbona merged commit 8301da1 into 2-dev Jun 3, 2019

4 checks passed

codecov/project 81.68% remains the same compared to 8703d4b
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@thomasarbona thomasarbona deleted the KZL-1097-column-view branch Jun 3, 2019

@Aschen Aschen referenced this pull request Jun 14, 2019

Merged

Release 2.4.0 #539

Aschen added a commit that referenced this pull request Jun 14, 2019

Merge pull request #539 from kuzzleio/2.4.0-proposal
Release 2.4.0

Bug fixes

    [ #536 ] Save current filters to component upon subscribe to watch collection (xbill82)
    [ #533 ] Call createCollection from collection controller (jenow)
    [ #526 ] Allow anonymous to log out (benoitvidis)
    [ #521 ] Add overflow to mapping card (Njuelle)

New features

    [ #534 ] Column list view (jenow)
    [ #531 ] Import/export environments (jenow)
    [ #528 ] Show aggregations in search result if any (jenow)
    [ #520 ] Add replace document button (jenow)
    [ #522 ] Add refresh button (berthieresteban)

Enhancements

    [ #527 ] Remove unauthorized actions (benoitvidis)
    [ #523 ] Save sort filter in raw json mode (jenow)
    [ #518 ] Human readable date fields (berthieresteban)

Others

    [ #530 ] Rename link to koncorde documentation (Yoann-Abbes)
    [ #525 ] Source filtering (benoitvidis)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.