hypertrons / hypertrons-crx

A browser extension for insights into GitHub projects and developers.
https://crx.hypertrons.io
Apache License 2.0
346 stars 102 forks source link

[Meeting] Hypercrx Biweekly Meeting: 2023-08-16 #720

Closed l1tok closed 1 year ago

l1tok commented 1 year ago

Description

Agenda

1. How many users?

Chrome Edge Total
834(+11) 733(-21) 1567(-10)

2. Bug

3. OSPP

andyhuang18 commented 1 year ago

Report on work completed so far:

  1. The user's repo collection can be stored locally in the browser, and the next time the browser is opened, the user's custom repo collection data can be read. Since antd's menu needs to receive the return value of the getitem function as a menuitem, and the return value cannot be stored directly via chrome.storage.local.set due to nesting, I extracted the information required by the getitem function (label,key, icon, children), and converted it into a storable data structure for storage. Also, when reading the local data via chrome.storage.local.get, you need to pass the information mentioned above into the getitem function as parameters to get the value of the menu.
  2. Implemented reset default repo-collection function:SetAsDefault, user can initialize menu to default state by this button.
  3. A particular collection can be deleted, and in order to add new collections without duplicate key conflicts, the remaining collections need to be renumbered after deleting the collection. Similarly, the children of each renumbered collection should also be renumbered. UpdateCollection function is used to realize the renumbering.
  4. User can add the current repo to a specific collection by using the getRepoName function to get the name of the repository on the current page and add it to the item list of the collection.
  5. To make the code more understandable, I'll use an example in JSON form to briefly describe the item's information:
    [
    {
    "label": "X-Lab",
    "key": "collection1",
    "icon": "GithubOutlined",
    "children": [
      { "label": "delete collection", "key": "delete1", "icon": "DeleteOutlined" },
      { "label": "add current Repo", "key": "add1", "icon": "FolderAddOutlined" },
      { "type": "divider" },
      { "label": "open-digger", "key": "1.1" },
      { "label": "open-perf", "key": "1.2" },
      { "label": "open-leaderboard", "key": "1.3" },
      { "label": "open-wonderland", "key": "1.4" }
    ]
    }
    ]
    • label is the name of the collection
    • key is the key of the unique collection option, in the first level, the key is the collection plus a numeric numbering arrangement
    • icon is the icon in front of the option
    • children is the information contained in the collection.
    • The meaning of the data in the second level is similar to that in the first level, where the first three items are the delete collection option for deletion, the add current repo option for adding a repo, and a separator containing only the type attribute. children is the information contained within the collection that is associated with the parent collection number.
andyhuang18 commented 1 year ago

Simply recorded a demo video, the operations include adding collection, deleting collection, adding current repo to collection, resetting default values.

https://github.com/hypertrons/hypertrons-crx/assets/50283262/f304a803-f8f3-4e2c-9859-705a5990327e

wxharry commented 1 year ago

Hi, @andyhuang18 . Appreciate your work so far. I am working on a new design of the current collection button about where to put it and how is should interact. Should be done this week, so you can take it easy on implementing details on the repo collection button. However, you could focus on the pop up window first. Looks like this modal could be a good choice, but feel free to use whatever you think is proper. Feel free to comment below or in PR or DM in on WeChat or Slack for any concerns. Good Job!