Steeditor.app: Community-field was restricted to lower-case chars only

in #utopian-io6 years ago

Project Information

A GitHub Issue was created:

The bug was confirmed and fixed by the project owner

Expected behavior

Originally expected behavior: The community field in the post's json_metadata is (from Steem-perspective) only required to be valid JSON, there is no restriction on characters or formats from the blockchain implementation: https://github.com/steemit/steem/blob/c6b865b6f27999cba38f3840151c8306f14f3371/libraries/protocol/steem_operations.cpp#L86

Actual behavior

Steeditor requires the community field to consist of lower case chars only and shows an error message when other chars are used.
While lower-case chars only is quite common for the community field across apps, not all apps do this. Actifit for example uses a list in the community field. The blockchain allows any content as long as the resulting json_metadata is valid JSON.

How to reproduce

Enter upper case or special chars in the community field
screenshot_2018-08-25_12-59-51

Corresponding check in the code:
https://github.com/jakipatryk/steeditor/blob/6911916e38eb7a8919e6a336def474d8e10dbeb8/src/app/editor/components/community-partial-form/community-partial-form.component.spec.ts#L31

Environment

  • Browser: Chrome 68.0
  • Steeditor.app at rev. 6911916

However, in the context of Hivemind communities, applying the same rules as for account names is a reasonable choice as pointed out by @jakipatryk. The previous rule with lower-case chars only was, nevertheless, too strict for that requirement. In the discussion, it turned out that the previous account name validation rules also did not cover all cases.

@jakipatryk has changed to validation rule for the community field to the same rule as for account names and has extended the account name validation rules to the same set of rules applied by Condenser, SteemConnect and others.

GitHub Account

https://github.com/crokkon

Sort:  

Hi @stmdev thanks for making this contribution.

Thanks to you, the issue has been fixed

  1. The post title contained sufficient information. It follows the set convention except for the missing project version which ought to have been ([Product Name] [Product Version] – Succinct description of the bug), but no release version yet, so.
  2. The actual and expected behavior were thoroughly explained. Looking through the closed issue, I like the helpful correspondence with the PO.
  3. The steps you provided were clear as day.

It's a great contribution, and it adds significant value to the open source community.

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? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @fego!

So far this week you've reviewed 1 contributions. Keep up the good work!

Hey, @stmdev!

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!

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63030.98
ETH 2594.62
USDT 1.00
SBD 2.74