-
Notifications
You must be signed in to change notification settings - Fork 7
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
Revamp the software section #19
Conversation
Not sure how to vizualize the changes on the gitbook. I tried to build it in local ( |
@alexfoias just checking if you are still working on this? (opened for a while) |
@jcohenadad I will work to make it work with the new version of the website. This issue was opened when we were on the gitbook platform. |
@kousu is there any way of seeing the built ? thanks |
For the record, yes, and this is currently documented here: Lines 2 to 7 in f4dbbe4
I didn't want to stick this on the main README.md because that would end up getting built in to the front page. |
@kousu It would be nice if we could implement CI to see the various branches. |
Screenshots of: 2f6bd49 I will have to fix the size of the images. @jcohenadad what should I do with the software that doesn't have a logo ? For the moment I added the lab's logo given the fact that the repos are under the neuropoly organization. |
indeed
i would leave it empty |
Screenshots from: de4cada |
in #19 (comment) the ratio should be kept-- also i suggest to use the same height across all logos-- more cosmetic |
I had suggestions about this in the original PR:
Right now I think it's not that hard to just build it locally and share via screenshot, or just by having reviewers also build it locally. I built this process assuming the vast majority of edits would be one-off commit-to-master sort of deals with no need to preview. But like I said if you want to show off your changes live instead of via screenshot you can
And in the extremely rare case you need to compare multiple live versions, you can just make multiple forks. Github won't let you do that directly from the Fork button but you just have to make a bunch of New repos then |
I have an idea: what if you combined the logo and name columns? Make sure to set
So that mousing over will pop-up the name, and that looking at it in a screenreader or text-only/braille browser will still show the title. And then for rows without a logo, like AxonPacking, you can just leave it as-is. |
Also, I would make sure to copy the logos into the assets/ folder so that the site is self-contained. |
I notice that the descriptions are centered while the docs link isn't anymore. I found the reason, it's this: neuro.polymtl.ca/_static/theme.css Lines 85 to 88 in f4dbbe4
because adding an extra column bumped the indexes all over. So, if you keep both logo and title columns, you'll have to bump those to 4,5 from 3,4 (but I'm still rooting over here in my tiny clown-car sized corner for merging the columns 🤡 🤡 🍰 ) |
Another suggestion would be to organize the software page as a gallery. I find it waaay cooler. |
I think a gallery is a lot messier personally. It's a lot easier to get an overview from a table. |
Here is the rendering of the software page as a gallery (in ef311af). The most democratic way is to vote with 👍 /👎 Updated version with the software description: Note: I'm aware the logos need to be vertically aligned, but i wasn't able to do it. Since this is not a priority it can be addressed later in #48 |
|
||
|
||
|
||
# -- Custom scripts ---------------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed in 176ebe5
|
||
LOGGER = logging.getLogger("conf") | ||
|
||
def build_gallery(app: Sphinx): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's inelegant to do all this in the conf.py file, running it on every parse like this.
It would be significantly cleaner to package this script as a custom directive, stick it up on pypi, and then instead of
```{include} gallery.txt
```
do
```{gallery}
- name: Spinal Cord Toolbox
website: https://spinalcordtoolbox.com/
repository: https://github.com/spinalcordtoolbox/spinalcordtoolbox
image: https://raw.githubusercontent.com/spinalcordtoolbox/spinalcordtoolbox/master/documentation/source/_static/img/logo_sct.png
- name: ivadomed
website: https://ivadomed.org
repository: https://github.com/ivadomed/ivadomed
image: https://raw.githubusercontent.com/ivadomed/ivadomed/master/images/ivadomed_logo.png
- name: qMRLab
website: https://qmrlab.readthedocs.io
repository: https://github.com/qMRLab/qMRLab
image: https://raw.githubusercontent.com/qMRLab/documentation/master/logo/qMR_logo_orig.png
- name: Shimming Toolbox
website: https://shimming-toolbox.org
repository: https://github.com/shimming-toolbox
image: https://raw.githubusercontent.com/shimming-toolbox/shimming-toolbox/master/docs/source/_static/img/shimming_toolbox_logo.png
- name: AxonDeepSeg
website: https://axondeepseg.readthedocs.io/
repository: https://github.com/neuropoly/axondeepseg
image: https://raw.githubusercontent.com/neuropoly/axondeepseg/master/docs/source/_static/logo_ads-alpha.png
```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and those images should be inlined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed-- but i don't have the time to do it, so #47
gallery.yml
Outdated
- name: Spinal Cord Toolbox | ||
website: https://spinalcordtoolbox.com/ | ||
repository: https://github.com/spinalcordtoolbox/spinalcordtoolbox | ||
image: https://raw.githubusercontent.com/spinalcordtoolbox/spinalcordtoolbox/master/documentation/source/_static/img/logo_sct.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These images should be inlined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't understand this comment (ie: what do you mean by 'inlined'?)
setup.py
Outdated
"sphinx-design~=0.0.11", | ||
# pinned because of this bug https://github.com/pydata/pydata-sphinx-theme/pull/509 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
careful, this changed the meaning of the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, fixed in 72c5bf1
random.shuffle(projects) | ||
for item in projects: | ||
if not item.get("image"): | ||
item["image"] = "https://jupyterbook.org/_images/logo-square.svg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image should be inlined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, fixed in 72c5bf1
conf.py
Outdated
LOGGER.info("building gallery...") | ||
grid_items = [] | ||
projects = yaml.safe_load((Path(app.srcdir) / "gallery.yml").read_text()) | ||
random.shuffle(projects) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'shuffle'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah! thanks, i was wondering why they were shuffled 😅
fixed in c3e6c8c
@@ -34,6 +34,7 @@ | |||
extensions = [ | |||
'myst_parser', # there's also myst_nb, which supports embedding Jupyter notebooks, but is heavier. | |||
'sphinx_panels', | |||
'sphinx_design', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a strange dependency. It pulls in bootstrap? But bootstrap has already been deprecated for several years by the existence of https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Grids. If I look at the web debugger in https://sphinx-design.readthedocs.io/en/sbt-theme/grids.html#grid-options I see they're not using that at all though:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is needed, otherwise on compilation i get:
/Users/julien/code/neuro.polymtl.ca/gallery.txt:2: WARNING: Unknown directive type "grid".
anticipating there will be more galleries in the future
The purpose of this PR is to revamp the software page.
TODO after this PR: