Skip to content

Commit

Permalink
Remove feature toggle
Browse files Browse the repository at this point in the history
RISDEV-5463
  • Loading branch information
HPrinz committed Jan 3, 2025
1 parent c32014f commit 2ca26f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 42 deletions.
13 changes: 2 additions & 11 deletions frontend/src/components/DocumentUnitDecisionSummary.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import dayjs from "dayjs"
import { computed, onMounted, ref } from "vue"
import { computed } from "vue"
import Tooltip from "./Tooltip.vue"
import DecisionSummary from "@/components/DecisionSummary.vue"
import { DocumentUnitCategoriesEnum } from "@/components/enumDocumentUnitCategories"
Expand All @@ -9,7 +9,6 @@ import TextButton from "@/components/input/TextButton.vue"
import ActiveCitation from "@/domain/activeCitation"
import EnsuingDecision from "@/domain/ensuingDecision"
import PreviousDecision from "@/domain/previousDecision"
import FeatureToggleService from "@/services/featureToggleService"
import { useDocumentUnitStore } from "@/stores/documentUnitStore"
import { useExtraContentSidePanelStore } from "@/stores/extraContentSidePanelStore"
import IconBaselineContentCopy from "~icons/ic/baseline-content-copy"
Expand All @@ -22,7 +21,6 @@ import IconImportCategories from "~icons/material-symbols/text-select-move-back-
const props = defineProps<{
data: ActiveCitation | EnsuingDecision | PreviousDecision
}>()
const featureToggle = ref()
const extraContentSidePanelStore = useExtraContentSidePanelStore()
const documentUnitStore = useDocumentUnitStore()
Expand All @@ -45,8 +43,7 @@ const isParallelDecision = computed(
() =>
props.data instanceof ActiveCitation &&
(props.data.citationType?.label == "Parallelentscheidung" ||
props.data.citationType?.label == "Teilweise Parallelentscheidung") &&
featureToggle,
props.data.citationType?.label == "Teilweise Parallelentscheidung"),
)
async function copySummary() {
Expand Down Expand Up @@ -74,12 +71,6 @@ async function generateHeadnote() {
behavior: "smooth",
})
}
onMounted(async () => {
featureToggle.value = (
await FeatureToggleService.isEnabled("neuris.category-importer")
).data
})
</script>

<template>
Expand Down
20 changes: 2 additions & 18 deletions frontend/src/components/ExtraContentSidePanel.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { storeToRefs } from "pinia"
import { computed, onMounted, ref } from "vue"
import type { Component } from "vue"
import { computed, onMounted } from "vue"
import { useRoute } from "vue-router"
import Tooltip from "./Tooltip.vue"
import AttachmentView from "@/components/AttachmentView.vue"
Expand All @@ -15,7 +15,6 @@ import TextButton from "@/components/input/TextButton.vue"
import DocumentUnitPreview from "@/components/preview/DocumentUnitPreview.vue"
import SideToggle, { OpeningDirection } from "@/components/SideToggle.vue"
import DocumentUnit from "@/domain/documentUnit"
import FeatureToggleService from "@/services/featureToggleService"
import { useExtraContentSidePanelStore } from "@/stores/extraContentSidePanelStore"
import { SelectablePanelContent } from "@/types/panelContentMode"
import IconAttachFile from "~icons/ic/baseline-attach-file"
Expand All @@ -38,8 +37,6 @@ const store = useExtraContentSidePanelStore()
const route = useRoute()
const featureToggle = ref()
const hasNote = computed(() => {
return !!props.documentUnit!.note && props.documentUnit!.note.length > 0
})
Expand Down Expand Up @@ -131,15 +128,6 @@ onMounted(() => {
store.isExpanded = hasNote.value || hasAttachments.value
}
})
/**
* Loads the feature flag for the category import feature.
*/
onMounted(async () => {
featureToggle.value = (
await FeatureToggleService.isEnabled("neuris.category-importer")
).data
})
</script>

<template>
Expand Down Expand Up @@ -200,11 +188,7 @@ onMounted(async () => {
/>
</Tooltip>

<Tooltip
v-if="featureToggle && !hidePanelModeBar"
shortcut="r"
text="Rubriken-Import"
>
<Tooltip v-if="!hidePanelModeBar" shortcut="r" text="Rubriken-Import">
<TextButton
id="category-import"
aria-label="Rubriken-Import anzeigen"
Expand Down
16 changes: 3 additions & 13 deletions frontend/src/routes/caselaw/documentUnit/[documentNumber].vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { useHead } from "@unhead/vue"
import { storeToRefs } from "pinia"
import { onMounted, onBeforeUnmount, ref, Ref } from "vue"
import { onBeforeUnmount, onMounted, ref, Ref } from "vue"
import { useRoute } from "vue-router"
import DocumentUnitInfoPanel from "@/components/DocumentUnitInfoPanel.vue"
import ExtraContentSidePanel from "@/components/ExtraContentSidePanel.vue"
Expand All @@ -13,7 +13,6 @@ import SideToggle from "@/components/SideToggle.vue"
import { useCaseLawMenuItems } from "@/composables/useCaseLawMenuItems"
import useQuery from "@/composables/useQueryFromRoute"
import DocumentUnit from "@/domain/documentUnit"
import FeatureToggleService from "@/services/featureToggleService"
import { ResponseError } from "@/services/httpClient"
import { useDocumentUnitStore } from "@/stores/documentUnitStore"
import { useExtraContentSidePanelStore } from "@/stores/extraContentSidePanelStore"
Expand All @@ -36,8 +35,6 @@ const route = useRoute()
const menuItems = useCaseLawMenuItems(props.documentNumber, route.query)
const { pushQueryToRoute } = useQuery()
const featureToggle = ref()
const validationErrors = ref<ValidationError[]>([])
const showNavigationPanelRef: Ref<boolean> = ref(
route.query.showNavigationPanel !== "false",
Expand Down Expand Up @@ -118,10 +115,8 @@ const handleKeyDown = (event: KeyboardEvent) => {
extraContentSidePanelStore.setSidePanelMode("preview")
break
case "r":
if (featureToggle.value) {
extraContentSidePanelStore.togglePanel(true)
extraContentSidePanelStore.setSidePanelMode("category-import")
}
extraContentSidePanelStore.togglePanel(true)
extraContentSidePanelStore.setSidePanelMode("category-import")
break
default:
break
Expand All @@ -137,11 +132,6 @@ onMounted(async () => {
window.addEventListener("keydown", handleKeyDown)
await requestDocumentUnitFromServer()
})
onMounted(async () => {
featureToggle.value = (
await FeatureToggleService.isEnabled("neuris.category-importer")
).data
})
</script>

<template>
Expand Down

0 comments on commit 2ca26f3

Please sign in to comment.