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

Make commits count as default for preview #255

Merged
merged 2 commits into from
Aug 17, 2023
Merged

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Aug 16, 2023

For the internal team review, I suggest using the "commits count" order as a default, we can decide which metric to use after the release sort information is added.

@github-actions
Copy link

github-actions bot commented Aug 16, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-08-17 08:53 UTC

@AhmedBasem20
Copy link
Collaborator

Thanks @unkcpz for giving me the chance to write my first ever code review!😅

The sorting process that happens in handleSort() is called only when the user selects a sort option from the dropdown menu.
But here we need to execute the sort by commits when the page is loaded, to achieve that we use useEffect hook that runs a specified effect immediately after rendering the page.

@unkcpz
Copy link
Member Author

unkcpz commented Aug 16, 2023

Thanks @AhmedBasem20, I have no idea how to do this "simple" task 😸 . Can you help me by point me to where is the code I need to look?

@AhmedBasem20
Copy link
Collaborator

Sorry @unkcpz I just was trying to comment on the code part that needs to be changed but didn't figure out how :D
So I added a commit with the changes

@unkcpz
Copy link
Member Author

unkcpz commented Aug 16, 2023

So I added a commit with the changes

That's better! Looks like an easy peasy for you.

I just was trying to comment on the code part that needs to be changed but didn't figure out how :D

You can goto the source code and select multiple lines, then there will be a "..." on the left. Click it and you can copy the premalink, paste to the comment and the code will show.

Peek 2023-08-16 18-37

@AhmedBasem20
Copy link
Collaborator

You can goto the source code and select multiple lines, then there will be a "..." on the left. Click it and you can copy the premalink, paste to the comment and the code will show.

Nice tip!

The preview looks good this can be merged now.

@unkcpz
Copy link
Member Author

unkcpz commented Aug 17, 2023

Thanks a lot! Now I see how useEffect used. All good to me. I'll merge this to gsoc and then merge to main. I guess the default ordering metric will changed again, but with this implementation, it will be just one line of change I hope.

@unkcpz unkcpz merged commit 81f588b into gsoc Aug 17, 2023
10 checks passed
@unkcpz unkcpz deleted the commits-count-as-default branch August 17, 2023 08:17
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 17, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
unkcpz added a commit that referenced this pull request Aug 18, 2023
We execute the sort by commits when the page is loaded, to achieve that we use `useEffect` hook that runs a specified effect immediately after rendering the page.

---------

Co-authored-by: Ahmed Basem <[email protected]>
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.

2 participants