Nitrous tag order bug and fix

in #utopian-io5 years ago (edited)

Project Information

Issue: https://github.com/steem-engine-exchange/nitrous/issues/56

I personally contacted the PO and the bug is acknowledged. I found the exact cause of the problem and made a PR which has been already merged.

PR: https://github.com/steem-engine-exchange/nitrous/pull/57

Expected behavior

Tag order should be preserved as the order a user used.

Actual behavior

Tag order is tangled when more than 8 tags are used.

The category (first tag) cannot be even changed later, so this is a serious issue.

How to reproduce

  • Visit https://www.palnet.io or any Nitrous
  • Use more than 8 tags
  • tag order is tangled (mostly alphabetically) so even the main tag (category) can be randomly selected.
  • Browser/App version: Any
  • Operating system: Any

Recording Of The Bug

When more than 5 tags are used, the tag (even including the main tag, called category) is sorted alphabetically.

Trying to post with this order of tags on palnet.io

https://busy.org/@guest123/pob-is-dead
alphabetically ordered and palnet is inserted in a random position.

Another example.

palnet is inserted in 4th position (instead of 3rd position) which shows it's quite random.
https://busy.org/@guest123/3y2xik-test

Cause and Fix

should use OrderedSet instead of Set

This was difficult to find, since standard JS library Set preserves the order,

and immutable library Set also preserve the order up to 8 elements! Why up to 8!

Anyway, now the problem has been resolved. Enjoy the untangled tag order in the dead PoB society :)

previously tag order is tangled. https://busy.org/@guest123/j1tbe-test

fixed. You can also see duplicated tag is automatically removed, and APP_NAME is added to the last position if it's not added by users. https://busy.org/@guest123/tag-order-test

GitHub Account

https://github.com/economicstudio

Sort:  

Hi @blockchainstudio, thanks for making this report

I noticed this issue has been fixed, your pull request was merged. Great of you to have fixed this. I like that you have provided a detailed analysis like you usually do.

Thanks again for the very detailed report. I look forward to reviewing more of your contributions.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @fego! Keep up the good work!

alinalazareva님이 blockchainstudio님을 멘션하셨습니당. 아래 링크를 누르시면 연결되용~ ^^
alinalazareva님의 Steem Monsters - 72 день

...вает собирать токены, но обноружился сервис ScotAuto от blockchainstudioВпиливаешь свой ник, подписываешь с помощью Steem Keycha...

Korean: 아시다시피 니트로스에서 태그 여러개 썼을때 순서가 엉망이 되는 버그가 있는데 이거 누군가 고치겠지 했는데 아직도 안 고쳤더군요. 그래서 생각보다 어려운가 하고 호기심에 들여다본게 화근이었네요. 전 니트로스 거의 쓰지도 않는데 왜 제가 고생을ㅠㅠ 생각보다는 찾기 힘든 버그였습니다. 일단 JS standard library의 set은 order를 보존한다고 되어있는데 immutable library의 set을 썼고 이건 순서가 보존이 안되는데 7개인지 8개까지는 또 되더군요. 그래서 많이 쓰면 엉망이 되고(대체로 알파벳순인데 또 꼭 그렇지 만도 않습니다.) 그 이하로 쓰면 괜찮아서 더 찾기가 힘든 버그였습니다.

nitrous개발자가 머지하는대로 반영될 겁니다.

그리고 오타를 찾았습니다. Project Name이 잘못된 것 같습니다.

감사합니다^^ 이거 한동안 계속 busy쪽 열일할때 아예 템플릿을 만들어놔서 그래요ㅎㅎ

어려운 버그를 찾아서 수정해주셨네요. 감사합니다.

clayop님이 blockchainstudio님을 멘션하셨습니당. 아래 링크를 누르시면 연결되용~ ^^
beajinsu님의 학회 갔다 왔슴다. EOS ICO와 GOOGLE IPO의 차이점은??

좋은 내용이네요. blockchainstudio 님이 옥션 전공이시니 같이 논문 하나 쓰시면 되겠네요!

블록체인스튜디오님 감사드립니다. 덕분에 이제는 9개 이상의 태그를 사용해도 제대로 출력이 되네요^^ 고생 많으셨습니다!

Hey, @blockchainstudio!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Lol did everybody just gloss over the POB is Dead.

I want to know more about this in particular. What do you think about Proof-of-Brain?

Posted using Partiko Android

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 57972.96
ETH 2357.13
USDT 1.00
SBD 2.36