fix: Use native a tag for https URL in the sidebar (#10254)

This PR updates the sidebar component to use a native <a> tag for the Help Center URL component. It also updates the build pipeline to use the esbuild options minifyIdentifiers and keepNames set to true.
This commit is contained in:
Pranav
2024-10-09 21:04:04 -07:00
committed by GitHub
parent b49eaa5c45
commit 8505aa48c3
2 changed files with 16 additions and 6 deletions

View File

@@ -90,13 +90,17 @@ export default {
/> />
</div> </div>
<div class="flex flex-col items-center justify-end pb-6"> <div class="flex flex-col items-center justify-end pb-6">
<PrimaryNavItem <a
v-if="!isACustomBrandedInstance" v-if="!isACustomBrandedInstance"
icon="book-open-globe" v-tooltip.right="$t(`SIDEBAR.DOCS`)"
name="DOCS" :href="helpDocsURL"
open-in-new-page class="text-slate-700 dark:text-slate-100 w-10 h-10 my-2 flex items-center justify-center rounded-lg hover:bg-slate-25 dark:hover:bg-slate-700 dark:hover:text-slate-100 hover:text-slate-600 relative"
:to="helpDocsURL" rel="noopener noreferrer nofollow"
/> target="_blank"
>
<fluent-icon icon="book-open-globe" />
<span class="sr-only">{{ $t(`SIDEBAR.DOCS`) }}</span>
</a>
<NotificationBell @open-notification-panel="openNotificationPanel" /> <NotificationBell @open-notification-panel="openNotificationPanel" />
<AgentDetails @toggle-menu="toggleOptions" /> <AgentDetails @toggle-menu="toggleOptions" />
<OptionsMenu <OptionsMenu

View File

@@ -42,6 +42,11 @@ if (isLibraryMode) {
plugins = [vue(vueOptions)]; plugins = [vue(vueOptions)];
} }
const esbuildOptions = {
minifyIdentifiers: false,
keepNames: true,
};
export default defineConfig({ export default defineConfig({
plugins: plugins, plugins: plugins,
build: { build: {
@@ -107,4 +112,5 @@ export default defineConfig({
mockReset: true, mockReset: true,
clearMocks: true, clearMocks: true,
}, },
esbuild: isLibraryMode ? esbuildOptions : undefined,
}); });