Skip to content

WIP: Support additional forges #2215

Open
mmatous wants to merge 5 commits into
pydata:mainfrom
mmatous:alt-forges
Open

WIP: Support additional forges #2215
mmatous wants to merge 5 commits into
pydata:mainfrom
mmatous:alt-forges

Conversation

@mmatous

@mmatous mmatous commented May 28, 2025

Copy link
Copy Markdown

Hi, this PR contains support for additional SW forges. Project source link in header, link shortening, and edit button are separated by commit.

I had some trouble with SVG assets due to having little experience with CSS or Webpack. How should I bundle them? I couldn't figure out the correct Webpack config, so they're inline for now.

Should I grayscale the icon link in header considering the note about not styling social media icons due to a11y in _icon-links.css?

/* We no longer color the social media icons in their brand colors (makes a11y harder)

How should I handle Codeberg shortlink icon and dark/light mode? The inlined one changes colors in the exact oposite way than I'd like (dark blue on dark) and its other version works fine on dark but disappears on light theme. I tried two separate defs in _icons.scss inside html[data-theme="dark|light"] (mentioned in https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/styling.html#color-variables) but that didn't work.

I also noticed a function being called unnecessarily and fixed that in a separate and a bit offtopic commit. I can send that one in a different PR, if you'd like.

Requested in #2201

@gabalafou

Copy link
Copy Markdown
Collaborator

Hey, heads up, we're refactoring the way that we shorten URLs in #2068

@mmatous

mmatous commented Jun 29, 2025

Copy link
Copy Markdown
Author

Should I drop the corresponding commit and make a separate PR for shortening these forges later?

@drammock

Copy link
Copy Markdown
Member

Should I drop the corresponding commit and make a separate PR for shortening these forges later?

Yeah I think separating the logo etc from the link shortening will make it easier to review/merge this quickly, and then do a separate PR for link shortening after #2068 lands

@mmatous

mmatous commented Jul 8, 2025

Copy link
Copy Markdown
Author

dropped the shortening, rebased on current main HEAD

Signed-off-by: Martin Matous <m@matous.dev>
Signed-off-by: Martin Matous <m@matous.dev>
Signed-off-by: Martin Matous <m@matous.dev>
@Carreau Carreau added this to the Good to have milestone Feb 18, 2026
@Carreau

Carreau commented Feb 18, 2026

Copy link
Copy Markdown
Collaborator

I'm marking as good to have, but I don't think we should inline svg like that it's impossible to review, and with some of the recent-ish xz-backdoor I think we should be worried about that kind of blobs; even if here SVG is ok-ish.

@drammock

Copy link
Copy Markdown
Member

I'm marking as good to have, but I don't think we should inline svg like that it's impossible to review, and with some of the recent-ish xz-backdoor I think we should be worried about that kind of blobs; even if here SVG is ok-ish.

FYI, FontAwesome 7.2 (just released) has an icon for forgejo (but not Gitea). @Carreau would you be ok with putting the SVG data here instead?

FontAwesome.library.add(

@Carreau

Carreau commented Feb 19, 2026

Copy link
Copy Markdown
Collaborator

I can be convinced of either; SVG are relatively simple in those case so I can be convinced to keep them inline. I think it also sort-of make sens to have them at separate file with build step to at least be able to see them in typical case when browsing the repository, either locally on the web.

@Yann-P Yann-P modified the milestones: Good to have, 0.19.0 May 19, 2026
@Yann-P Yann-P mentioned this pull request May 19, 2026
@Yann-P Yann-P mentioned this pull request Jun 8, 2026
@Yann-P Yann-P modified the milestones: 0.19.0, 0.20.0 Jun 8, 2026
@Yann-P Yann-P modified the milestones: 0.20.0, 0.21.0 Jul 9, 2026
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.

5 participants