-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/nus-cs3281/2024
- Loading branch information
Showing
32 changed files
with
542 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,13 @@ on: [push] | |
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
name: Build & Deploy to GitHub Pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Build & Deploy to GitHub Pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} | ||
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | ||
BASE_URL: /2024 | ||
uses: MarkBind/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- run: npm i -g markbind-cli | ||
- run: markbind deploy --ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
### Project: Foo | ||
### Projects I have worked on | ||
|
||
#### Mattermost | ||
Mattermost is an open-source collaboration platform designed for secure communication throughout the entire software development lifecycle. It serves as a self-hostable alternative to Slack, offering similar functionalities with the added benefit of full control over hosting and management. | ||
|
||
### Twenty | ||
Twenty CRM is a modern, open-source Customer Relationship Management (CRM) platform. It serves as an self-hostable alternative to Salesforce. | ||
|
||
Give an intro to the project here ... | ||
|
||
### My Contributions | ||
|
||
Give a description of your contributions, including links to relevant PRs | ||
In the [mattermost PR (approved not merged yet)](https://github.com/mattermost/mattermost/pull/26278). I addressed this [issue](https://github.com/mattermost/mattermost/issues/25991) where the CLI command to list the teams uses a magic number of 9999. Utilizing such large magic numbers presents two problems: it restricts the ability to list more than 9999 teams and could result in a request that is too large. To solve this, I implemented pagination for the request, with each page containing 200 teams. Subsequently, I updated the test cases to reflect the new expected behavior. | ||
|
||
In the [Twenty PR (merged)](https://github.com/twentyhq/twenty/pull/4198). I addressed an [issue](https://github.com/twentyhq/twenty/issues/4181) reported by a user concerning LinkedIn school URLs not parsing correctly. Upon investigating the issue on the frontend, I discovered that the existing regex was only configured to support company URLs. To resolve this, I updated the regex to also accommodate school URLs and conducted tests to ensure the fix was effective. | ||
|
||
|
||
### My Learning Record | ||
|
||
Give tools/technologies you learned here. Include resources you used, and a brief summary of the resource. | ||
### gomock | ||
I have learned to use GoMock, a mocking framework for Golang, which streamlines the creation of mock objects for unit testing. It helps with decoupling components, enabling the simulation of complex behaviors and interactions. I am surprised how easy it to use to mock complex behaviours. | ||
Will definitely use it for Golang testing next time! | ||
|
||
#### Resource used: | ||
- [gomock docs](https://github.com/uber-go/mock) | ||
|
||
### Yarn workspaces | ||
Yarn Workspaces is a feature of Yarn that simplifies handling multiple packages within a single repository by enabling shared dependencies and centralized script management. I learnt Yarn Workspaces while setting up the repository for the Twenty project. | ||
Overall, it is a good experience as I learnt more alternatives to Lerna and NPM workspaces. | ||
|
||
#### Resource used: | ||
- [Yarn workspaces docs](https://yarnpkg.com/features/workspaces) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
| Week | Achievements | | ||
| ---- | ------------ | | ||
| 1 | Help prepared idea & facilitated Saturday code sprint - MarkBind website making | | ||
| 3 | Repo cleaning - Added tags to issues, added items to project road map, added summaries to issues, and cleaned up some issues. Examples: [Allow markbind serve to specify custom host #2382](https://github.com/MarkBind/markbind/issues/2382), [Optimize MarkBind for saving as PDF #2397](https://github.com/MarkBind/markbind/issues/2397), [UG: images appear in two places #2401](https://github.com/MarkBind/markbind/issues/2401) | | ||
| 4 | Investigated: [UG: images appear in two places #2401](https://github.com/MarkBind/markbind/issues/2401) | | ||
| 4 | Investigated and closed: [The collapsed page nav appears in the print view #2157](https://github.com/MarkBind/markbind/issues/2157) | | ||
| 4, 5 | Reviewed: [MarkBind Template for Software Project Documentation #2400](https://github.com/MarkBind/markbind/pull/2400) | | ||
| 5 | Reviewed: [Migrate stylelint to latest version #2292](https://github.com/MarkBind/markbind/pull/2425) | | ||
| 5 | Discussed: [Use justified text formatting for tooltips #2420](https://github.com/MarkBind/markbind/issues/2420) | | ||
| 5, 6 | Investigated and reviewed: [Fix external styles and script not hoisted #2414](https://github.com/MarkBind/markbind/pull/2414) | | ||
| 6 | Reviewed: [Add line-numbers when wrapping is needed for printing #2431](https://github.com/MarkBind/markbind/pull/2431) | | ||
| 6 | Investigated: [Tooltip artefact left over for annotation point #2432](https://github.com/MarkBind/markbind/issues/2432) | | ||
| 6 | Reviewed and merged: [Disable pop over in a-point if there is no header and content passed by user #2436](https://github.com/MarkBind/markbind/pull/2436) | | ||
| 6 | Investigated and fixed bug: [Utilize GitHub Actions to aid checking of commit message #2429](https://github.com/MarkBind/markbind/pull/2429) | | ||
| 6 | Help fixed bug and merged: [Annotation content slot #2427](https://github.com/MarkBind/markbind/pull/2427) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### MarkBind | ||
|
||
|
||
| Week | Achievements | | ||
| ---- | ------------ | | ||
| 5 | Merged PR: [Enhance search performance of algolia plugin #2406]() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
| Week | Achievements | | ||
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| 13/05/2023 | Reviewed PR: [Fix non-rendering PlantUML diagram #2005](https://github.com/reposense/RepoSense/pull/2005) | | ||
| 28/06/2023 | Reviewed PR: [Incorrect dropdown box for config in UG: Customizing Report #2009](https://github.com/reposense/RepoSense/pull/2009) | | ||
| 17/08/2023 | Reviewed PR: [Increase minimum version required for Git #2028](https://github.com/reposense/RepoSense/pull/2028) | | ||
| 01/10/2023 | Reviewed PR: [Migrate build.gradle from Groovy to Kotlin #2008](https://github.com/reposense/RepoSense/pull/2008) | | ||
| 01/10/2023 | Reviewed PR: [Migrate c-resizer.vue to typescript #2038](https://github.com/reposense/RepoSense/pull/2038) | | ||
| 01/10/2023 | Reviewed PR: [Migrate random-color-gen.js to typescript #2043](https://github.com/reposense/RepoSense/pull/2043) | | ||
| 30/10/2023 | Reviewed PR: [Update GitHub-specific references in codebase and docs #2050](https://github.com/reposense/RepoSense/pull/2050) | | ||
| 30/10/2023 | Reviewed PR: [Add dynamic positioning support for tooltips #2056](https://github.com/reposense/RepoSense/pull/2056) | | ||
| 30/10/2023 | Reviewed PR: [Fix tooltip zIndex such that it doesn't occlude next file title #2057](https://github.com/reposense/RepoSense/pull/2057) | | ||
| 30/10/2023 | Reviewed PR: [Add contributors section to the README #2062](https://github.com/reposense/RepoSense/pull/2062) | | ||
| 31/10/2023 | Reviewed PR: [Fix: Added contributors to the README.md #2064](https://github.com/reposense/RepoSense/pull/2064) | | ||
| 02/11/2023 | Reviewed PR: [Created CONTRIBUTING.md #2065](https://github.com/reposense/RepoSense/pull/2065) | | ||
| 23/12/2023 | Reviewed PR: [Reduce scope of try-catch block in ArgsParser::parse #2074](https://github.com/reposense/RepoSense/pull/2074) | | ||
| 23/12/2023 | Reviewed PR: [Move TimeUtil ParseException throwing to ArgsParser::parse method #2075](https://github.com/reposense/RepoSense/pull/2075) | | ||
| 23/12/2023 | Commented on Issue: [Reduce the scope of the try-catch block in ArgsParser::parse #1989](https://github.com/reposense/RepoSense/issues/1989) | | ||
| 23/12/2023 | Created Issue: [Refactor RepoConfigCsvParser::processLine method to avoid arrowhead style code #2073](https://github.com/reposense/RepoSense/issues/2073) | | ||
| 23/12/2023 | Created Issue: [Refactor RepoConfiguration to simplify constructor complexity #2076](https://github.com/reposense/RepoSense/issues/2076) | | ||
| 1 | Reviewed PR: [Bump follow-redirects from 1.15.2 to 1.15.4 in /frontend #2079](https://github.com/reposense/RepoSense/pull/2079) | | ||
| 1 | Reviewed PR: [Refactor RepoConfigCsvParser::processLine method to avoid arrowhead style code #2080](https://github.com/reposense/RepoSense/pull/2080) | | ||
| 2 | Reviewed PR: [Remove hash symbol from URL when decoding hash #2086](https://github.com/reposense/RepoSense/pull/2086) | | ||
| 2 | Reviewed PR: [Remove redundant User class #2093](https://github.com/reposense/RepoSense/pull/2093) | | ||
| 2 | Reviewed PR: [Add cypress tests for renderFilterHash #2017](https://github.com/reposense/RepoSense/pull/2017) | | ||
| 2 | Reviewed PR: [Improve memory usage by refactoring Regex compilation #2092](https://github.com/reposense/RepoSense/pull/2092) | | ||
| 3 | Reviewed PR: [Use syntax coloring for code blocks in docs #2099](https://github.com/reposense/RepoSense/pull/2099) | | ||
| 3 | Closed Issue: [Forward/Backward Navigation Using Browser Buttons #2090](https://github.com/reposense/RepoSense/issues/2090) | | ||
| 4 | Reviewed PR: [Updating SystemTestUtil::assertJson to compare Json objects instead of line-by-line analysis #2087](https://github.com/reposense/RepoSense/pull/2087) | | ||
| 4 | Reviewed PR: [Refactor RepoConfiguration to simplify constructor complexity #2078](https://github.com/reposense/RepoSense/pull/2078) | | ||
| 5 | Created Issue: [Fix failing cypress test for range changes in chartview #2111](https://github.com/reposense/RepoSense/issues/2111) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,29 @@ | ||
### Tool/Technology 1 | ||
### Angular | ||
|
||
List the aspects you learned, and the resources you used to learn them, and a brief summary of each resource. | ||
#### **Attribute Directive**: | ||
- **Summary**: Attribute directives can change the appearance or behavior of DOM elements and Angular components. | ||
- **Resources**: | ||
- [Angular Documentation](https://angular.io/guide/attribute-directives): Provides guidelines on creating and applying attribute directive, covering user events handling and passing values to attribute directive. | ||
- **Practice**: | ||
- [PR #1239](https://github.com/CATcher-org/CATcher/pull/1239): Created an attribute directive that listen to click event and will open error snackbar if the target link is an internal link. | ||
|
||
### Tool/Technology 2 | ||
#### **Components**: | ||
- **Summary**: Components are the main building blocks for Angular. Each components consists of 3 files: | ||
- HTML: Defines the layout of the component's view. | ||
- CSS: Defines the component-specific styles. | ||
- Typescript: Implements the component's logic and behavior. | ||
- **Resources**: | ||
- [Angular Documentation](https://angular.io/guide/component-overview): Provides guidelines on creating components. | ||
- Previous code by other developers: Learned from existing component implementations in the codebase. | ||
- **Practice**: | ||
- [PR #233](https://github.com/CATcher-org/WATcher/pull/233): Edited exsiting component and created new component to improve WATcher activity dashboard. | ||
|
||
... | ||
### Jasmine | ||
Jasmine is a behavior-driven development framewrok specific for JavaScript unit testing. | ||
|
||
I primarily learned how to use Jasmine from its [documentation](https://jasmine.github.io/api/edge/global). I utilized it extensively while working on WATcher test case refactoring. Some relevant PRs include: [PR #241](https://github.com/CATcher-org/WATcher/pull/241), [PR #244](https://github.com/CATcher-org/WATcher/pull/244), [PR #245](https://github.com/CATcher-org/WATcher/pull/245), [PR #246](https://github.com/CATcher-org/WATcher/pull/246), [PR #247](https://github.com/CATcher-org/WATcher/pull/247) | ||
|
||
- **`describe`**: Define a group of spec (suite) | ||
- **`it`**: Define a single spec. | ||
- **`expect`**: Create an expectation for a spec. | ||
- **Class `Spy`**: Mock functions (spies) that can be used to track function calls. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
| Week | Achievements | | ||
| ---- | ------------ | | ||
| 3 | Merged PR: [Uncaught error when invalid link is clicked #1239](https://github.com/CATcher-org/CATcher/pull/1239) | | ||
| 4 | Merged PR: [Improve activity dashboard design #233](https://github.com/CATcher-org/WATcher/pull/233) | | ||
| 4 | Merged PR: [Refactor test cases for Login Component, Session Model and Conflict Model #241](https://github.com/CATcher-org/WATcher/pull/241) | | ||
| 4 | Merged PR: [Remove markdown.css from test env stylesheets #243](https://github.com/CATcher-org/WATcher/pull/243) | | ||
| 4 | Merged PR: [Refactor test cases for issue paginator #244](https://github.com/CATcher-org/WATcher/pull/244) | | ||
| 4 | Merged PR: [Refactor test cases for issue sorter #245](https://github.com/CATcher-org/WATcher/pull/245) | | ||
| 4 | Merged PR: [Refactor github label constants #246](https://github.com/CATcher-org/WATcher/pull/246) | | ||
| 4 | Merged PR: [Refactor test cases for search filter #247](https://github.com/CATcher-org/WATcher/pull/247) | | ||
| 6 | Reviewed PR: [Refactor certain filters into its own service #259](https://github.com/CATcher-org/WATcher/pull/259) | | ||
| 6 | Merged PR: [Remove test cases for permissions service #260](https://github.com/CATcher-org/WATcher/pull/260) | | ||
| 6 | Submitted issue: [Improve E2E testing #1251](https://github.com/CATcher-org/CATcher/issues/1251) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
### Tool/Technology 1 | ||
## markdown-it | ||
|
||
MarkBind uses `markdown-it` for rendering html from markdown files. `markdown-it` is a fast markdown parser and has very extensive plugins support and great extensibility. | ||
|
||
### Adding custom rules to `markdown-it` through adding a rule to `markdown-it`'s attribute | ||
|
||
Adding custom rules to `markdown-it` can be done easily by adding a rule to the attribute. | ||
For example, if we want to add our rules for rendering fenced code blocks, we can do so by adding a rule to the `markdown-it`'s attribute. | ||
|
||
```javascript | ||
markdownIt.renderer.rules.fence = (tokens: Token[], | ||
idx: number, options: Options, env: any, slf: Renderer) => {} | ||
``` | ||
|
||
**Parameters** | ||
|
||
* **tokens (Token[]):** An array of Token objects. Each token represents a segment of the parsed Markdown content. Tokens of particular interest for the fence rule include: | ||
- `token.type`: The type of the token (e.g., 'fence', 'code', 'paragraph'). | ||
- `token.info`: Contains the language specified after the opening set of backticks, if any, plus additional options. | ||
- `token.content`: The text content within the fenced code block. | ||
* **idx (number):** The index of the current `fence` token within the `tokens` array. This lets us find tokens before and after the fence if needed. | ||
* **options (Options):** This object contains global options passed to the Markdown-it parser. This could include settings specific to our setup. | ||
* **env (any):** An object containing environment variables and potentially additional data derived from the parsed Markdown. This can be useful for accessing context when defining rendering logic. | ||
* **slf (Renderer):** A reference to the Markdown-it Renderer object itself. This is primarily used when we need to call other rendering rules to process nested Markdown code within the fenced block. | ||
|
||
**Purpose of the fence renderer rule** | ||
|
||
The `markdownIt.renderer.rules.fence` function is responsible for taking a `fence` token (representing a fenced code block) and converting it into the appropriate HTML output. This could include syntax highlighting, if our setup supports it. | ||
|
||
**How it Works** | ||
|
||
Inside the function, we have access to all the information in the tokens, options, and the environment. We can craft custom logic to generate the desired HTML structure for our fenced code blocks. Here's a very basic example: | ||
|
||
```javascript | ||
markdownIt.renderer.rules.fence = (tokens, idx, options, env, slf) => { | ||
const token = tokens[idx]; | ||
const content = token.content; | ||
const language = token.info.trim(); // Language after the opening backticks | ||
|
||
return `<pre><code class="language-${language}">${content}</code></pre>`; | ||
}; | ||
``` | ||
|
||
List the aspects you learned, and the resources you used to learn them, and a brief summary of each resource. | ||
|
||
### Tool/Technology 2 | ||
|
||
... | ||
... |
Oops, something went wrong.