-
Notifications
You must be signed in to change notification settings - Fork 29
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
Initial functionality provided for action items for improving records #30
Conversation
<template lang="pug"> | ||
div.record-root | ||
modal(v-if="isModalVisible" @close="isModalVisible = false" :record="modalRecord") | ||
record.asd(v-for="record in records" :record="record" :tabindex="0" :rootname="'Document'" :indentLevel="1" v-on:dblclick.native ="isModalVisible = !isModalVisible; modalRecord = record; " @keydown.native.meta.8="$emit('deleteRecord', record)" @keydown.native.meta.67="copyToClipboard(record)") |
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.
are you sure about .asd
? :)
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.
how do we trigger delete and copy?
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.
I have no idea about asd :) Probably, was trying about something about styling and forgot to clean up my mess. Delete and copy should be working as you specified in issue details.
This is fantastic work @emredalkiran, thank you! |
<script> | ||
export default { | ||
name: 'modal', | ||
data() { |
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.
we should remove unused properties, including the methods
object.
div.modal-body | ||
textarea(:spellcheck="false") {{ record | pretty }} | ||
div.modal-footer | ||
button.modal-default-button(@click="$emit('close')") OK |
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.
would be great to capture escape to close the modal.
@@ -13,7 +13,8 @@ export default new Vuex.Store({ | |||
collections: [], | |||
records: [], | |||
collectionName: '', | |||
totalNumberOfResults: null | |||
totalNumberOfResults: null, | |||
recordList: [] |
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.
what is recordList?
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.
I was trying a clean way to represent nested documents recursively. Again, forgot to clean up afterwards.
@dashersw thanks for the feedback and kind words. record.vue has some problems, it doesn't repsresent _id key properly, by adding additional nesting of id in the form of an array. On top of that, if you delete all the documents on a query result or left a few documents in the collapsed mode, the alternating background also gets removed because of the wrapping html element's size has shrunken (in order to support scrolling and keeping alternate between collapsed/open rows, I alternated the background color of the wrapper element). The border of the records view remains same though, which creates an awkward view. I'll try to address these problems as well as the ones you mentioned above. In addition to that, it is not very clear which document has focus for deleting. I think adding some sort of highlighting for active document would also be beneficial. I think font size for record displaying can be decreased a little bit and color of the records text can be darkened a little, towards a greyish white, considering dark background color. |
Thank you! I agree. I think overall the font sizes are too big in the project :) we should decrease them. |
Provides basic functionality for action items stated in #5
It has some styling issues, but before working on it anymore, I wanted to check if the current approach is reasonable.