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

Add sidebar section #247

Merged
merged 19 commits into from
Aug 10, 2023
Merged

Add sidebar section #247

merged 19 commits into from
Aug 10, 2023

Conversation

AhmedBasem20
Copy link
Collaborator

This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:

  • Keep the sidebar isolated from the header and footer
  • Disable the sidebar for small screens (mobile phones)
  • Make it in a fixed position, and allow for scrolling.

I used Materials UI Drawer component, it handles most of the above with less code.

A lot of things are done in App.jsx so I tried to modularize the code a little bit.

The project folder structure

- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html

still facing styling issues so I'll open it as a draft until it is ready for review

@github-actions
Copy link

github-actions bot commented Jul 21, 2023

PR Preview Action v1.4.4
🚀 Deployed preview to https://aiidateam.github.io/aiida-registry/pr-preview/pr-247/
on branch gh-pages at 2023-08-10 20:31 UTC

@AhmedBasem20 AhmedBasem20 marked this pull request as ready for review August 8, 2023 14:57
@unkcpz
Copy link
Member

unkcpz commented Aug 8, 2023

Thanks!

It'll be better if the logo header is not stick but will disappear/reveal when scroll page up, as show in the example of this post The result looks like the example in the end of this article https://webdesign.tutsplus.com/how-to-hide-reveal-a-sticky-header-on-scroll-with-javascript--cms-33756t

@AhmedBasem20 AhmedBasem20 force-pushed the sidebar-section branch 2 times, most recently from b8fd8ea to a1cdc59 Compare August 9, 2023 09:30
Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

Had some questions, I have to admit I am very ignorant on css and jsx 😅
You even move elements to components, wonderful!

aiida-registry-app/src/App.css Show resolved Hide resolved
aiida-registry-app/src/App.jsx Show resolved Hide resolved
* It renders the Details component on the left side and the Sidebar component on the right side.
*
* @component
* @example
Copy link
Member

Choose a reason for hiding this comment

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

What is this @example?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is used to show how the component should be rendered, it is good for complex components with parameters. but it doesn't add much for simple components like <DetailsContainer /> so I'll delete it.

@AhmedBasem20
Copy link
Collaborator Author

I have to admit I am very ignorant on css and jsx 😅

This is normal, I feel this all the time while working on tasks related to css and design🤣
Currently, I spent much of the time reviewing css basics.

@AhmedBasem20
Copy link
Collaborator Author

can you check the preview page? it works now.
Sorry I pushed the code when it worked but there are some ambiguous parts that need to be documented. I'll ping you when done.

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

Looks all good to me. Let's wait all tests pass and we can merge. There is a small issue, but not related to this PR you can see if it easy to fix but just nitpick you can ignore it.

<h1 className='plugin-header'>
AiiDA plugin package &quot;<a href={value.code_home}>{value.name}</a>&quot;
</h1>
<Link to={'/'}><p>&lt; back to the registry index</p></Link>
Copy link
Member

Choose a reason for hiding this comment

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

I notice that when the mouse hover not on the text but on the same line the hyperlink is still activated, this may cause coincidently trigger to go back to the /. I guess this is the code related.

(You can check by moving the mouse not on the "back to the registry index" but on the same horizontal line.)

@AhmedBasem20
Copy link
Collaborator Author

Thanks @unkcpz this is fixed now! let's wait another 40 minutes😄

@unkcpz unkcpz merged commit 4d94a38 into gsoc Aug 10, 2023
10 checks passed
@unkcpz
Copy link
Member

unkcpz commented Aug 10, 2023

Cheers! 🚀

@unkcpz unkcpz deleted the sidebar-section branch August 10, 2023 21:02
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit that referenced this pull request Aug 17, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
unkcpz pushed a commit to unkcpz/aiida-registry that referenced this pull request Aug 17, 2023
author AhmedBasem <demhamesab@gmail.com> 1687946371 +0300
committer Jusong Yu <jusong.yeu@gmail.com> 1692310651 +0200

Add PR preview action

Initialize React app.
Created the components and routes of the app.
Updated The webpage.yml with the deploy script.
Commit the plugins JSON file into git so that the React app can read the data from it.
Reused the current stylesheet and svg images

feat: sort plugins by commit count (aiidateam#241)

Use github API to get the commits endpoint.
To get the number of commits in the last year we specify the period in the params of the request
and then extract the number of pages from the response header.

For plugins not hosted on github, we clone the repository and use git directly.

fix layout

deploy only when merged to master

Fix PR preview path issue

update

Display Entry points information & Add Sort feature (aiidateam#245)

This commit introduces a new ranking of the yearly commits for sorting the plugins.

It also includes the implementation of showing the plugin descriptions to the plugin detail page.

Change checkbox icon (aiidateam#248)

Using `CheckCircleIcon` from `@mui/icons-material/CheckCircle`

Add sidebar section (aiidateam#247)

This addresses aiidateam#246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```

Fix the website design on small screens (aiidateam#253)
unkcpz pushed a commit that referenced this pull request Aug 18, 2023
This addresses #246 and introduces a sidebar with plugin content outlines. To implement the sidebar, several considerations were taken into account:
* Keep the sidebar isolated from the header and footer
* Disable the sidebar for small screens (mobile phones)
* Make it in a fixed position, and allow for scrolling.

We used Materials UI `Drawer` component, it handles most of the above with less code.

Things are done in `App.jsx` and modulized to the have components in `components` folder.

The project folder structure
```
- public
- src
 -- assets
 -- Components
      ---MainIndex.jsx
      ---Details.jsx
      ---Sidebar.jsx
  --App.jsx
  --main.jsx
-index.html
```
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