-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add tabtest viewer to IDE #1585
Conversation
f3f669b
to
dc9150e
Compare
Looks nice, but I'm experiencing some strange behavior. Steps to reproduce
Expected behavior
Actual behavior
Steps to reproduce
Expected behavior
Actual behavior
|
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.
Scrollbars are missing if the grid overflows the work area 😢
packages/xod-project/src/flatten.js
Outdated
@@ -85,7 +85,7 @@ const terminalOriginalDirectionLens = R.lensProp('originalDirection'); | |||
const isLeafPatchWithImplsOrTerminal = def( | |||
'isLeafPatchWithImplsOrTerminal :: Patch -> Boolean', | |||
R.anyPass([ | |||
Patch.hasImpl, | |||
R.both(Patch.isPatchNotImplementedInXod, Patch.hasImpl), |
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.
This check looks strange: if an apple is green and greenish.
Why can’t we have a single function to check for the implementation presence? That is, we should kill either Patch.isPatchNotImplementedInXod
or Patch.hasImpl
'createAttachmentManagedByMarker :: PatchPath -> String -> Attachment', | ||
(markerName, content) => | ||
createAttachment( | ||
// TODO: what about unknown filenames? |
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 think it’s a bug. Pick from MANAGED_ATTACHMENT_FILENAMES
with Maybe, explode with assertion
packages/xod-project/src/flatten.js
Outdated
@@ -795,6 +795,7 @@ export const extractPatches = R.curry( | |||
const convertPatch = def( | |||
'convertPatch :: Project -> [Pair PatchPath Patch] -> Patch -> Patch', | |||
(project, leafPatches, patch) => | |||
// TODO: check for marker instead of hasImpl? |
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.
See above. There should be just one proper way to check impl.
About UX:
And about overflow and scrollbars, note that grid can overflow in both ways: vertical / horizontal ;) |
af783e2
to
3b54e62
Compare
2548323
to
2102a10
Compare
The behavior is still here on Linux. Interesting thing: I can shut it up if add: .data-grid-container .data-grid .cell > input {
width: 140px;
} 140px is a measured width of a |
The table looks more organized if the very first row is rendered center-aligned and in bold: .tabtest-editor tr:first-child .cell {
font-weight: bold;
text-align: center;
} |
IMHO, "tabt..." looks not very nice. There is no easy way to make node two-cells-wide or just name it "tests"? |
It’s a common pain for marker nodes in XOD. Eventually, we’ll implement auto-growth (#937) and the problem goes away. As a temporary solution we might make all markers two-three cells in width and/or manually resizable. That’s a question for a separate PR though. |
@@ -37,3 +37,23 @@ | |||
background-color: #444444; | |||
} | |||
} | |||
|
|||
@mixin styled-scrollbar { |
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.
👍 for utilizing mixins
cursor: cell; | ||
background-color: $input-bg; | ||
color: $input-color-text; | ||
transition : background-color 500ms ease; |
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.
transition : background-color 500ms ease; | |
transition : background-color 100ms ease; |
500ms is more than human reaction time, so looks boring. Animations look snappier when done in 50-200ms
valueRenderer={R.prop('value')} | ||
overflow={'nowrap'} | ||
onCellsChanged={(changes, additions = []) => { | ||
R.compose( |
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.
Can you please extract it to a function? Now we have a complex nested function right inside deeply nested React component.
Also, what’s for the past comments about a single way to check whether a C++ implementation is present? |
…and I suggest making cell editor inputs left-aligned. Otherwise experience is strange when I’m entering a long comment which overflows single cell boundaries |
e671456
to
3668c4c
Compare
3668c4c
to
48e223c
Compare
🐛 Can't copy-paste markers |
Bad UX Also, navigating with arrow keys are not scrolls the window, so I can select something outside the view area. When I start editing it — it scrolls. Also if I might change column width, it can fit the window :) |
Fixed copy-pasting bug, thanks! Navigating with arrow keys should be available in the very near future: nadbm/react-datasheet#92 Not sure what you mean by
Do you want resizable columns? |
@evgenykochetkov yep, I'm about resizable columns :) But, actually, it's out of scope 🙈 |
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.
LGTM, but left some suggestions about styling.
Also, it will be good to add selecting all with Cmd+A
and select cells with the pressed Shift key, but it could be a tweak in another PR in nearest future.
packages/xod-client/src/core/styles/components/ReactDatasheet.scss
Outdated
Show resolved
Hide resolved
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.
LGTM 🔥 for the release of tabtest
8885bab
to
30e6e2f
Compare
…ing `patch.test.tsv` attachments
…ch.test.tsv` attached
30e6e2f
to
048eef7
Compare
Closes #1540