Skip to content

Commit

Permalink
Merge branch 'main' into 1790-add-plugin-tap-calendly
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Jul 3, 2024
2 parents 2f36ac1 + 44c7a8c commit 71969eb
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-yaml-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- name: Get changed files in the docs folder
id: changed-files
uses: tj-actions/changed-files@v44.5.2
uses: tj-actions/changed-files@v44.5.5
with:
files: |
_data/**/*.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Get changed files
id: changed_files
uses: tj-actions/changed-files@v44.5.2
uses: tj-actions/changed-files@v44.5.5
with:
sha: ${{ github.event.pull_request.head.sha }}
json: "true"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_meltano_add_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Get changed plugins
id: changed_plugins
uses: tj-actions/changed-files@v44.5.2
uses: tj-actions/changed-files@v44.5.5
with:
files: _data/meltano/*/*/*.yml
matrix: true
Expand Down
29 changes: 29 additions & 0 deletions src/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,32 @@ pre[class*="language-"] {
content: "/";
color: #f963bc;
}

.tooltip {
position: relative;
}
.tooltip .tooltip-content {
visibility: hidden;
width: max-content;
background-color: #62626e;
text-align: center;
padding: 5px;
border-radius: 5px;
position: absolute;
z-index: 1;
left: 105%;
top: -5px;
}
.tooltip .tooltip-content::after {
content: " ";
position: absolute;
right: 100%;
top: 50%;
margin-top: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent #62626e transparent transparent;
}
.tooltip:hover .tooltip-content {
visibility: visible;
}
68 changes: 31 additions & 37 deletions src/components/PluginSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,78 +62,78 @@
<p class="text-lg">Repo</p>
<div>
<img
v-if="repoType === 'github'"
v-if="repo.type === 'github'"
class="w-8 h-4 inline gap-x-11"
src="../assets/images/github-brands.svg"
/><img
v-else-if="repoType === 'gitlab'"
v-else-if="repo.type === 'gitlab'"
class="w-8 h-4 inline gap-x-11"
src="../assets/images/gitlab-brands.svg"
/><img
v-else-if="repoType === 'bitbucket'"
v-else-if="repo.type === 'bitbucket'"
class="w-8 h-4 inline gap-x-11"
src="../assets/images/bitbucket-brands.svg"
/><img
v-else
class="w-8 h-4 inline gap-x-11"
src="../assets/images/git-alt-brands.svg"
/><a :href="repo"
/><a :href="repo.url"
><img
class="inline gap-x-11"
:alt="repo"
:src="`https://img.shields.io/static/v1?label=${parsedRepo.user}&message=${parsedRepo.repo_name}&color=blue`"
:alt="repo.url"
:src="`https://img.shields.io/static/v1?label=${repo.user}&message=${repo.name}&color=blue`"
/>
</a>
</div>
</div>
<div
v-if="!$page.plugins.keywords.includes('airbyte_protocol') && repoType !== 'bitbucket'"
v-if="!$page.plugins.keywords.includes('airbyte_protocol') && repo.type !== 'bitbucket'"
>
<ul class="list-disc list-inside shields space-y-1">
<li>
<img
alt="Stars"
:src="`https://img.shields.io/${repoType}/stars/${parsedRepo.user}/${parsedRepo.repo_name}?label=Stars`"
:src="`https://img.shields.io/${repo.type}/stars/${repo.user}/${repo.name}?label=Stars`"
/>
</li>
<li>
<img
alt="Forks"
:src="`https://img.shields.io/${repoType}/forks/${parsedRepo.user}/${parsedRepo.repo_name}?label=Forks`"
:src="`https://img.shields.io/${repo.type}/forks/${repo.user}/${repo.name}?label=Forks`"
/>
</li>
<li>
<img
alt="Last Commit Date"
:src="`https://img.shields.io/${repoType}/last-commit/${parsedRepo.user}/${parsedRepo.repo_name}?label=Last%20Commit`"
:src="`https://img.shields.io/${repo.type}/last-commit/${repo.user}/${repo.name}?label=Last%20Commit`"
/>
</li>
<li>
<img
alt="Open Issues"
:src="`https://img.shields.io/${
repoType === 'github' ? 'github/issues-raw' : 'gitlab/issues/open-raw'
}/${parsedRepo.user}/${parsedRepo.repo_name}?label=Open%20Issues`"
repo.type === 'github' ? 'github/issues-raw' : 'gitlab/issues/open-raw'
}/${repo.user}/${repo.name}?label=Open%20Issues`"
/>
</li>
<li>
<img
alt="Open PRs"
:src="`https://img.shields.io/${
repoType === 'github' ? 'github/issues-pr-raw' : 'gitlab/merge-requests/open'
}/${parsedRepo.user}/${parsedRepo.repo_name}?label=Open%20Pull%20Requests`"
repo.type === 'github' ? 'github/issues-pr-raw' : 'gitlab/merge-requests/open'
}/${repo.user}/${repo.name}?label=Open%20Pull%20Requests`"
/>
</li>
<li>
<img
alt="Contributors"
:src="`https://img.shields.io/${repoType}/contributors/${parsedRepo.user}/${parsedRepo.repo_name}?label=Contributors`"
:src="`https://img.shields.io/${repo.type}/contributors/${repo.user}/${repo.name}?label=Contributors`"
/>
</li>
<li>
<img
alt="License"
:src="`https://img.shields.io/${repoType}/license/${parsedRepo.user}/${parsedRepo.repo_name}?color=c0c0c4&label=License`"
:src="`https://img.shields.io/${repo.type}/license/${repo.user}/${repo.name}?color=c0c0c4&label=License`"
/>
</li>
</ul>
Expand All @@ -145,6 +145,19 @@
"
>
<ul class="list-disc list-inside shields space-y-1">
<li>
<img
alt="Last Commit Date"
:src="
(() => {
const url = `https://img.shields.io/${repo.type}/last-commit/${repo.user}/${repo.name}?label=Last%20Commit`;
const [path] = repo.url.match(/airbyte-integrations\S+/) ?? [];
return path ? `${url}&path=${path}` : url;
})()
"
/>
</li>
<li>
<img alt="License" :src="`https://img.shields.io/badge/License-MIT-lightgrey`" />
</li>
Expand All @@ -154,11 +167,11 @@
<p class="text-lg">EDK Extension Repo</p>
<div>
<img
v-if="repoType === 'github'"
v-if="repo.type === 'github'"
class="w-8 h-4 inline gap-x-11"
src="../assets/images/github-brands.svg"
/><img
v-else-if="repoType === 'gitlab'"
v-else-if="repo.type === 'gitlab'"
class="w-8 h-4 inline gap-x-11"
src="../assets/images/gitlab-brands.svg"
/><img
Expand Down Expand Up @@ -266,25 +279,6 @@ export default {
"ext_repo",
],
computed: {
parsedRepo() {
// For some plugin variants, either the `variant` or `name` doesn't match the GH repo
// So we need to parse it from the repo URL to make badges
// https://github.com/:user/:repoName
const urlParts = this.repo.split("/");
return { user: urlParts[3], repo_name: urlParts[4] };
},
repoType() {
// Some plugins are hosted on github, some on gitlab
let repoType = "";
if (this.repo.includes("github.com")) {
repoType = "github";
} else if (this.repo.includes("gitlab.com")) {
repoType = "gitlab";
} else if (this.repo.includes("bitbucket.org")) {
repoType = "bitbucket";
}
return repoType;
},
parsedEDKRepo() {
// For some plugin variants, either the `variant` or `name` doesn't match the GH repo
// So we need to parse it from the repo URL to make badges
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
leave-to-class="scale-y-0 -translate-y-1/2 opacity-0"
>
<div
class="absolute z-40 grid w-full grid-cols-1 py-2 mx-auto mt-12 overflow-scroll shadow-lg max-h-96 justify-self-center grid-span-1 bg-slate-100"
class="absolute z-40 grid w-full grid-cols-1 py-2 mx-auto mt-12 overflow-y-auto shadow-lg max-h-96 justify-self-center grid-span-1 bg-slate-100"
v-if="search != '' && (searchFocused || hoveringOnSearchOptions)"
>
<div
Expand Down
52 changes: 50 additions & 2 deletions src/templates/Plugins.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,29 @@
<ul class="pl-4 list-disc list-inside">
<li v-for="(variant, index) in filteredVariants" v-bind:key="index">
<g-link
class="tooltip"
:to="variant.node.path"
v-if="variant.node.path !== $page.plugins.path"
>{{ variant.node.maintainer.label }}</g-link
>
{{ variant.node.maintainer.label }}
<div class="tooltip-content">
<img
alt="Last Commit Date"
:src="
((repo) => {
const url = `https://img.shields.io/${repo.type}/last-commit/${repo.user}/${repo.name}?label=Last%20Commit`;
if (!variant.node.keywords.includes('airbyte_protocol')) {
return url;
}
const [path] = repo.url.match(/airbyte-integrations\S+/) ?? [];
return path ? `${url}&path=${path}` : url;
})(parsedVariantRepos[variant.node.variant])
"
/>
</div>
</g-link>
<span v-else>{{ variant.node.maintainer.label }}</span>
<span v-if="variant.node.isDefault"> (default)</span>
<span v-if="variant.node.keywords.includes('meltano_sdk')">
Expand Down Expand Up @@ -405,7 +424,7 @@
<PluginSidebar
:name="$page.plugins.name"
:domain_url="$page.plugins.domain_url"
:repo="$page.plugins.repo"
:repo="parsedRepo"
:maintenance_status="$page.plugins.maintenance_status"
:keywords="$page.plugins.keywords"
:variant="$page.plugins.variant"
Expand Down Expand Up @@ -459,6 +478,34 @@ export default {
(variant) => variant.node.pluginType === this.$page.plugins.pluginType
);
},
parsedVariantRepos() {
return this.filteredVariants.reduce(
(parsed, variant) => ({
...parsed,
[variant.node.variant]: this.$parseRepo(variant.node.repo),
}),
{}
);
},
parsedRepo() {
return this.$parseRepo(this.$page.plugins.repo);
},
},
methods: {
$parseRepo(repoUrl) {
const [user, name] = repoUrl.split("/").slice(3);
return {
url: repoUrl,
type: (() => {
if (repoUrl.includes("github.com")) return "github";
if (repoUrl.includes("gitlab.com")) return "gitlab";
if (repoUrl.includes("bitbucket.org")) return "bitbucket";
return "";
})(),
user,
name,
};
},
},
};
</script>
Expand Down Expand Up @@ -532,6 +579,7 @@ query Plugins($path: String!, $name: String!) {
keywords
pluginType
quality
repo
maintainer {
name
label
Expand Down

0 comments on commit 71969eb

Please sign in to comment.