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

Plaintext votes 2 #141

Merged
merged 20 commits into from
Dec 13, 2022
Merged

Plaintext votes 2 #141

merged 20 commits into from
Dec 13, 2022

Conversation

vteague
Copy link
Member

@vteague vteague commented Dec 11, 2022

This is a start on getting plaintext up- and down-voting to work. I also organised dismissed-votes a little better.

Up-voting only works on the QuestionDisplayCard, not on the QuestionDetailView. Down-voting is not implemented yet. On the QuestionDisplayCard, both numbers are the total number of upvotes.

Flagging is not implemented except to turn the flag red.

While testing my changes, I noticed Issue #140 . However, I don't think this PR introduces it because it was present in main already.

public class QuestionTests
{

/* FIXME - this test displays exactly the same unpredictable behaviour that was
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we fix this test before merging?

}

/*
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 delete this code and add a card to the back log

private HashSet<string> _dismissedQuestionIDs;
private bool _isInitialised;

public void Init()
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation seems strange in this file, are the methods meant to be indented that far?

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't worry about this

@@ -0,0 +1,101 @@
using System;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would like some more tests for this. For example try and test what happens when you try to add something in the hashset

@vteague vteague merged commit 929b144 into main Dec 13, 2022
@vteague vteague deleted the plaintext-votes-2 branch December 13, 2022 04:21
@vteague vteague restored the plaintext-votes-2 branch December 13, 2022 23:41
@vteague
Copy link
Member Author

vteague commented Dec 14, 2022

corrected error that caused tests to fail.

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.

2 participants