-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes parts of #8135 - Fixed rendering of the documentation panel when no entry is selected. - Multiple improvements of tags in the documentation panel: - Group color for `GROUP` tag - Custom styling for `DEPRECATED`, `UNSTABLE`, and `ADVANCED` tags. - Sorting - Collapsing tags that exceed one line with a button - Filtering out some tags (`ICON` and `TEXT_ONLY` for now) - Filtering out private items from the documentation - Fixing group colors (was incorrectly assuming unique group names) and fallback color (was incorrectly replacing every character in the name with `-` before hashing, which was hilarious). - Fixing ComponentBrowser demo scene. - Minor fixes for mock database in demo scenes (removed duplicated entry, added an additional one for testing tags) https://github.com/enso-org/enso/assets/6566674/10f4f5d0-9332-40c6-93c6-8263eb5fd85a
- Loading branch information
Showing
10 changed files
with
163 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script setup lang="ts"> | ||
import { computed, ref, watch } from 'vue' | ||
import type { View } from './DocsTags.vue' | ||
const props = defineProps<{ view: View; parentOffset: number; forceShow: boolean }>() | ||
const emit = defineEmits<{ hidden: [] }>() | ||
const tagRef = ref<HTMLDivElement>() | ||
const shouldBeHidden = computed(() => { | ||
if (tagRef.value == null) return false | ||
return tagRef.value.offsetTop > props.parentOffset | ||
}) | ||
watch(shouldBeHidden, (m) => m && emit('hidden')) | ||
</script> | ||
|
||
<template> | ||
<div | ||
ref="tagRef" | ||
:class="{ hide: shouldBeHidden && !props.forceShow }" | ||
:style="props.view.style || {}" | ||
> | ||
{{ props.view.label }} | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.hide { | ||
display: none; | ||
} | ||
</style> |
106 changes: 87 additions & 19 deletions
106
app/gui2/src/components/DocumentationPanel/DocsTags.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.