Skip to content

Conversation

@zapdos26
Copy link
Contributor

Added "Unlock" Feature;
Made a dynamic dropdown;
Moved vote option creation to Static;

Made a dynamic dropdown;
Moved vote option creation to Static;
Prevent button press processing when vote is locked;
Changed how "isLocked" status is determined
Added "Collect" to getDynamicSelect();
Removed vote builder in unlockpoll() since its no longer needed
const users: string[] = votes[key].split(",");
users.splice(0, 1);
// Don"t bother with empty votes
if (users.length === 0) return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we're now going to show an option if it has 0 votes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally, yes. However since there appears to be a want for anonymous polling, we can re-add it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well even with non anonymous polling we don't want to show votes with 0 people in the results block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to though, otherwise how will we know what the vote options are?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it looks like you kept the buttons but disabled voting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were previous iterations (see previous commits) where the buttons were deleted. However I re-added the buttons since they store information in regards to who voted. Since we kept the buttons, this will be re-added.

Comment on lines +31 to +32
const newActionBlock: ActionsBlock = { type: "actions", elements: [] };
actionBlocks.push(newActionBlock);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just make this one line if we're not going to re-use the defined constant again.

Comment on lines +39 to +40
const button: Button = { type: "button", value: " ", text: Static.buildTextElem(parameters[i]) };
actionBlocks[actionBlockCount].elements.push(button);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

@zapdos26
Copy link
Contributor Author

Opened new PR (#46) to fix merging issues.

@zapdos26 zapdos26 closed this Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants