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

[OSS101] Task 5: Display Community OpenRank #843

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

Fiveneves
Copy link

Brief Information

This pull request is in the type of (more info about types):

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • test

Related issues (all available keywords):

Details

Add two features of the community OpenRank network and the community OpenRank racing bar to the perceptor page.

  1. Two folders, community-openrank-network and community-openrank-racing-bar, have been added to the project src/pages/ContentScripts/features directory
  2. The api file community.ts for obtaining community OpenRank data has been added to the project src/api directory
  3. The Chinese and English title and description fields for the two newly added features have been added to the translation.json file in the src/locales/en and src/locales/zh_CN directories of the project respectively
  4. The final looks:
    image
    image

Checklist

Others

N.A.

@wangyantong2000
Copy link
Collaborator

Would it be better to compare similar items in racing bar, such as comparing people to people, comparing PR to PR, and so on. Perhaps a selection box can be added to choose between different categories, or in other ways.

@andyhuang18
Copy link
Collaborator

Hi~@Fiveneves Thank you for your detailed work. You provided rich pictures and detailed descriptions. From your commit flow, it can be seen that you take this task seriously.

@Fiveneves
Copy link
Author

Would it be better to compare similar items in racing bar, such as comparing people to people, comparing PR to PR, and so on. Perhaps a selection box can be added to choose between different categories, or in other ways.

Okay, I'll try to change it

td {
border: 1px solid black;
text-align: center; /* 水平居中 */
vertical-align: middle; /* 垂直居中 */
Copy link
Collaborator

@wangyantong2000 wangyantong2000 Jul 25, 2024

Choose a reason for hiding this comment

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

It is best to replace the Chinese comments in the code with English.

// lastDataAvailableMonth.setDate(0);
//
// const newestMonth =
// lastDataAvailableMonth.getFullYear() + '-' + (lastDataAvailableMonth.getMonth() + 1).toString().padStart(2, '0');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Necessary comments can be retained. Similar to some code that has been commented out, it can be deleted if it is no longer used.

import DataNotFound from '../repo-networks/DataNotFound';
import { CommunityOpenRankDetails } from './data';
import { JsonObject } from 'type-fest';

Copy link
Collaborator

Choose a reason for hiding this comment

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

Some imported items are not used in the subsequent code, and similar situations in the code can be removed.

Copy link
Collaborator

@andyhuang18 andyhuang18 Jul 25, 2024

Choose a reason for hiding this comment

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

@wangyantong2000 Thanks for the detailed review. ❤️

@CLAassistant
Copy link

CLAassistant commented Jul 25, 2024

CLA assistant check
All committers have signed the CLA.

@Fiveneves
Copy link
Author

@wangyantong2000 Hi~All the problems mentioned above have been resolved, and the final look as shown in the demo gif below.
demo

@Fiveneves Fiveneves marked this pull request as ready for review July 26, 2024 03:23
@wangyantong2000
Copy link
Collaborator

wangyantong2000 commented Aug 3, 2024

Sorry for not replying to this PR for a long time. This task was completed very well. The task is to design and develop features related to Community OpenRank. The final form you presented is good. Just because the previous similar function was to directly request the obtained data. And the data for this feature was not directly provided. You organize the relevant data by yourself, and there may be situations where there is no data according to the default dates set in the code, such as some new warehouses. So this PR may not be merged into the main repository temporarily. But this is due to data level issues, which does not prevent it from being a good final assignment. You have successfully and well completed this assignment.

@wxharry
Copy link
Collaborator

wxharry commented Aug 18, 2024

Sorry for not replying to this PR for a long time. This task was completed very well. The task is to design and develop features related to Community OpenRank. The final form you presented is good. Just because the previous similar function was to directly request the obtained data. And the data for this feature was not directly provided. You organize the relevant data by yourself, and there may be situations where there is no data according to the default dates set in the code, such as some new warehouses. So this PR may not be merged into the main repository temporarily. But this is due to data level issues, which does not prevent it from being a good final assignment. You have successfully and well completed this assignment.

If there are some cases that data is not provided, we should handle it properly in this feature. This feature is supposed to be independant.

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.

[OSS101] Task 5: Display Community OpenRank
6 participants