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

Outputs are reversed in helpboxes sometimes #1432

Closed
nkrkv opened this issue Sep 5, 2018 · 3 comments
Closed

Outputs are reversed in helpboxes sometimes #1432

nkrkv opened this issue Sep 5, 2018 · 3 comments

Comments

@nkrkv
Copy link
Member

nkrkv commented Sep 5, 2018

  • Version: 0.23.0
  • Reported on the forum, I confirm it

Steps to reproduce

Open the helpbox for xod/core/nth-input(string)

Expected behavior

The outputs are listed (from bottom to top) in order:

  • OUT
  • _

Actual behavior

They are listed in reverse

Details

The same behavior reproduces for some nodes (e.g. xod/stream/pass-from-sequence), but not for others (e.g. xod/bits/number-to-u32). Perhaps the bug affects nodes with auto-generated pin labels only.

@nkrkv nkrkv added this to To do in UX Debt via automation Sep 5, 2018
@evgenykochetkov evgenykochetkov moved this from To do to In progress in UX Debt Sep 12, 2018
@brusherru brusherru self-assigned this Sep 13, 2018
@brusherru
Copy link
Contributor

2018-10-18 17 35 49
Looks like this is not actual anymore... or I did not understand the bug 🤔

@nkrkv
Copy link
Member Author

nkrkv commented Oct 18, 2018

The same behavior reproduces for some nodes (e.g. xod/stream/pass-from-sequence), but not for others (e.g. xod/bits/number-to-u32).

@evgenykochetkov
Copy link
Contributor

@brusherru, it is solved by something like this:

From 91090405f17cee7e9f3646d698a2b244bb15b87b Mon Sep 17 00:00:00 2001
From: Evgeny Kochetkov <evgeny.kochetkov@me.com>
Date: Wed, 12 Sep 2018 12:40:44 +0300
Subject: [PATCH] fix(xod-client): ensure pin order in patch docs

Fixes #1432
---
 packages/xod-client/src/editor/components/PatchDocs.jsx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/xod-client/src/editor/components/PatchDocs.jsx b/packages/xod-client/src/editor/components/PatchDocs.jsx
index 0d70635a..c8a99fe3 100644
--- a/packages/xod-client/src/editor/components/PatchDocs.jsx
+++ b/packages/xod-client/src/editor/components/PatchDocs.jsx
@@ -123,6 +123,7 @@ const PatchDocs = ({ patch, minimal }) => {
   )(patch);
 
   const [inputPins, outputPins] = R.compose(
+    R.map(R.sortBy(XP.getPinOrder)),
     R.partition(XP.isInputPin),
     XP.normalizeEmptyPinLabels,
     R.map(pin =>
-- 
2.15.0

@nkrkv nkrkv added this to To do in Hotfixes Oct 25, 2018
@evgenykochetkov evgenykochetkov moved this from To do to In progress in Hotfixes Oct 29, 2018
UX Debt automation moved this from In progress to Done Nov 1, 2018
Hotfixes automation moved this from In progress to Done Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Hotfixes
  
Done
Development

No branches or pull requests

3 participants