-
Notifications
You must be signed in to change notification settings - Fork 39
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
Move user-selectable options into addInputBlock() #50
Conversation
Move dropdowns out of addActionsBlock(), where they don't seem to affect the state, and so polls are not created with correct settings. Resolves sampaiodiego#49
that's awesome @RootPrivileges , thank you for all the investigation you have made to fix this.. this is an issue with Rocket.Chat, and it will be fixed in the upcoming 3.6.0 later this month.. but would be awesome to have it fixed earlier on the app itself. When testing your PR I found an issue though, when I hit "Add choices" it loses the option I chose on multiple/single choices and shows "Open vote" instead.. not sure it is another issue with rocket.chat or something in the app. |
If it's an upstream bug that is going to be fixed soon, not sure if merging is the right idea. This was my first dive into Rocket.Chat apps and I wasn't sure of the correct behaviour of the various APIs. It seems most logical to me that user inputs should be held inside an |
Interesting on the bug where it forgets the option - I'm able to reproduce that too. Sorry, I hadn't noticed it was doing that when I made my PR! I'm inclined to say that may also be a Rocket.Chat issue - I've not made any substantial changes to the code beyond splitting into separate If I remove the |
I'm reasonably sure now this is a bug somewhere upstream. To test, I added the following new
Pressing the "Add a choice button" here causes the placeholder for the input below to be moved up one in both cases: |
I think I'm going to have to leave this here. For a quick fix, moving both It's definitely something to do with dynamically modifying the number of options and the |
thanks again @RootPrivileges for your awesome work on investigating this issues.. the fix for "single choice" select was just published on rocket.chat 3.5.3... I'll talk to the Rocket.Chat Apps team regarding these other weird behaviors you found.. |
@RootPrivileges I have test this again and everything seems fixed in current rocket.chat version, so I'll be closing this PR and move on to fix other issues, where I'll move files around, ok? I really appreciated all your efforts |
Move dropdowns out of addActionsBlock(), where they don't seem to affect
the state, and so polls are not created with correct settings.
Resolves #49
This will conflict with #40, but the changes to the same file in there should be easy to migrate into the
addActionsBlock()
in my code as an additional element in the array.