We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is just a suggestion and doesn't need to be taken seriously 😅.
We can detect the type of version control system and output a better icon e.g. for GitHub, BitBucket, GitLab, with fallback to default icon as GitLab.
In src/components/ProjectDetailsSidebar/StyledProjectSidebar.tsx - we output .source class for gitBranchLink
src/components/ProjectDetailsSidebar/StyledProjectSidebar.tsx
.source
gitBranchLink
{gitBranchLink ? ( <div className="field-wrapper source">
We could adapt this to output a class based on the detected Git URL, e.g.
const isGitHub = () => { const patternGitHub = '(?:git|https?|git@)(?:\\:\\/\\/)?github.com[/|:][A-Za-z0-9-]+?\\/[\\w\\.-]+?\\.git(?:\\/?|\\#[\\w\\.\\-_]+)?$'; return new RegExp(patternGitHub).test(gitBranchLink); }
In src/components/Environment/StyledEnvironment.tsx and a few other files, we basically hardcode the icon to always output the git-lab.svg
src/components/Environment/StyledEnvironment.tsx
git-lab.svg
&.source { &::before { background-image: url('/static/images/git-lab.svg');
So we would need more classes for e.g. &.source-github and ensure github.svg exists as a file in static/images folder, e.g.
&.source-github
github.svg
static/images
&.source-github { &::before { background-image: url('/static/images/githug.svg');
The text was updated successfully, but these errors were encountered:
This is pretty good!
Sorry, something went wrong.
DaveDarsa
No branches or pull requests
This is just a suggestion and doesn't need to be taken seriously 😅.
We can detect the type of version control system and output a better icon e.g. for GitHub, BitBucket, GitLab, with fallback to default icon as GitLab.
In
src/components/ProjectDetailsSidebar/StyledProjectSidebar.tsx
- we output.source
class forgitBranchLink
We could adapt this to output a class based on the detected Git URL, e.g.
In
src/components/Environment/StyledEnvironment.tsx
and a few other files, we basically hardcode the icon to always output thegit-lab.svg
So we would need more classes for e.g.
&.source-github
and ensuregithub.svg
exists as a file instatic/images
folder, e.g.The text was updated successfully, but these errors were encountered: