-
Notifications
You must be signed in to change notification settings - Fork 56
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
fix: Proposal diff bugs #2639
fix: Proposal diff bugs #2639
Conversation
@lukebp ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK on Firefox.
- Duplicate request has been removed.
- Diff viewer is not shown on unvetted or vetted censored proposals.
- Diff viewer is shown on unvetted for admins.
- Diff viewer is not shown on unvetted proposals non-logged in users.
Needs code approval from @tiagoalvesdulce. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really nice! Thanks for the PR @vibros68!
const [state, send] = useFetchMachine({ | ||
actions: { | ||
initial: () => { | ||
if (versionsQueue.length) { | ||
return send(START); | ||
} | ||
return send(RESOLVE); | ||
}, | ||
start: () => { | ||
if (!versionsQueue.length) { | ||
return send(RESOLVE); | ||
} | ||
const version = versionsQueue[0]; | ||
if (version <= 0) { | ||
setVersionsQueue(drop(versionsQueue)); | ||
return send(START); | ||
} | ||
onFetchProposalDetailsWithoutState(token, version) | ||
.then((proposal) => { | ||
setFetchedProposals({ | ||
...fetchedProposals, | ||
[version]: proposal | ||
}); | ||
setVersionsQueue(drop(versionsQueue)); | ||
if (setVersionsQueue.length) { | ||
return send(START); | ||
} | ||
return send(RESOLVE); | ||
}) | ||
.catch((e) => send(REJECT, e)); | ||
|
||
return send(FETCH); | ||
}, | ||
done: () => {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AWESOME! Good job here, mate!
closes #2583
This diff fixes some bugs on proposal diff version.
the server.
the proposal is unvetted and the user is not admin or author.