Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

migrate: review opportunity details page to v6 review API#7110

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
himaniraghav3 merged 3 commits intov6fromPM-1761
Sep 16, 2025

Conversation

himaniraghav3
Copy link
Collaborator

Migrates review opportunity details page to v6 review api

Adds code from topcoder-react-lib to get details of the review opportunity (getDetails)
Also fixes the frontend to work with the new API response.

For an anonymous user, we are showing the review opportunity details page. On clicking the Apply for Review button, user is redirected to login, where if they're a reviewer, the normal flow occurs. And, if they're not a reviewer, we show them an error message saying Permission denied.

This message needs a link to a page where the user can go apply to be a reviewer - LMK of the url

migrates review opportunity details page to v6 review apifixes#1761
* the specified challenge.
*@param {Number} challengeId The ID of the challenge (not the opportunity id)
*@param {String} tokenV3=null Optional. Topcoder auth token v3.
*@default test

Choose a reason for hiding this comment

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

The JSDoc comment mentions@default test, but there is no default value provided in the function parameters. Consider removing the@default tag or providing a default value fortokenV3.

himaniraghav3 reacted with thumbs up emoji
*@default test
*@return {Action}
*/
functiongetDetailsDone(challengeId,opportunityId,tokenV3){

Choose a reason for hiding this comment

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

The parameteropportunityId is used in the function but is not documented in the JSDoc comment. Consider adding documentation foropportunityId.

himaniraghav3 reacted with thumbs up emoji
.then(details=>({ details}))
.catch((error)=>{
if(error.status!==401){
console.log('Error Getting Review Opportunity Details',error.content||error);

Choose a reason for hiding this comment

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

Usingconsole.log for error handling is not recommended in production code. Consider using a logging library or handling the error in a way that is more suitable for production environments.

himaniraghav3 reacted with thumbs up emoji
'Permission Required',
<span>
You must have a reviewer role to apply for this review opportunity.{' '}
<ahref="https://www.topcoder.com/community/member/reviewer-become"target="_blank"rel="noopener noreferrer">

Choose a reason for hiding this comment

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

Ensure the URLhttps://www.topcoder.com/community/member/reviewer-become is correct and up-to-date, as hardcoding URLs can lead to broken links if the URL changes.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

Need a correct url for this@jmgasper@kkartunov
Added gibberish for now

*@param {Number} challengeId The ID of the challenge (not the opportunity id)
*@return {Promise} Resolves to the api response in JSON.
*/
exportasyncfunctiongetDetails(challengeId,opportunityId){

Choose a reason for hiding this comment

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

The functiongetDetails is documented to return aPromise that resolves to the API response in JSON, but it actually returns a normalized object combining opportunity and challenge data. Consider updating the documentation to reflect the actual return structure.

himaniraghav3 reacted with thumbs up emoji
ai review feedbacks on return types and loggingFixes#1760
Copy link
Collaborator

@kkartunovkkartunov left a comment

Choose a reason for hiding this comment

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

Looks good.

removes link for how to be a reviewer, we can add it later when process is in placefixes#1761
fireErrorMessage(
'Permission Required',
<span>
You must have a reviewer role to apply for this review opportunity.

Choose a reason for hiding this comment

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

The removal of the link to 'Learn how to become a reviewer' may lead to confusion for users who are not aware of how to obtain a reviewer role. Consider providing guidance or a reference to where users can find more information about becoming a reviewer.

himaniraghav3 reacted with thumbs up emoji
@himaniraghav3himaniraghav3 merged commit60c420e intov6Sep 16, 2025
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@kkartunovkkartunovkkartunov approved these changes

@jmgasperjmgasperAwaiting requested review from jmgasper

@vas3avas3aAwaiting requested review from vas3a

@ajeftsajeftsAwaiting requested review from ajeftsajefts is a code owner

@luizrrodriguesluizrrodriguesAwaiting requested review from luizrrodriguesluizrrodrigues is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@himaniraghav3@kkartunov

[8]ページ先頭

©2009-2025 Movatter.jp