Skip to content

Commit

Permalink
Update tests, refactor logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lookacat committed May 10, 2023
1 parent 1a7ebcf commit 36e72d5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export default defineComponent({
const reduceBreadcrumb = (offsetIndex) => {
const breadcrumbMaxWidth = props.calculateBreadcrumbMaxWidth()
document.getElementById(props.id)?.style.setProperty('--max-width', `${breadcrumbMaxWidth}px`)
const totalBreadcrumbWidth = calculateTotalBreadcrumbWidth()
const isOverflowing = breadcrumbMaxWidth < totalBreadcrumbWidth
Expand Down
3 changes: 0 additions & 3 deletions packages/web-app-files/src/components/AppBar/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ export default defineComponent({
const appBarTotalWidth =
document.getElementById('files-view')?.parentElement?.clientWidth - leftControlsWidth * 2
const breadcrumbMaxWidth = appBarTotalWidth - leftControlsWidth
document
.getElementById('oc-breadcrumb')
?.style.setProperty('--max-width', `${breadcrumbMaxWidth}px`)
return breadcrumbMaxWidth
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
exports[`AppBar component renders by default no breadcrumbs, no bulkactions, no sharesnavigation but viewoptions and sidebartoggle 1`] = `
<div class="" displayviewmodeswitch="false" id="files-app-bar">
<oc-hidden-announcer-stub announcement="No items selected." level="polite"></oc-hidden-announcer-stub>
<div style="height: 114px;"></div>
<div class="files-topbar oc-py-s">
<h1 class="oc-invisible-sr">ExampleTitle</h1>
<div class="oc-flex oc-flex-middle files-app-bar-controls oc-flex-right">
Expand All @@ -29,7 +28,6 @@ exports[`AppBar component renders by default no breadcrumbs, no bulkactions, no
exports[`AppBar component renders if given, with content in the actions slot 1`] = `
<div class="" displayviewmodeswitch="false" id="files-app-bar">
<oc-hidden-announcer-stub announcement="No items selected." level="polite"></oc-hidden-announcer-stub>
<div style="height: 114px;"></div>
<div class="files-topbar oc-py-s">
<h1 class="oc-invisible-sr">ExampleTitle</h1>
<div class="oc-flex oc-flex-middle files-app-bar-controls oc-flex-right">
Expand All @@ -56,7 +54,6 @@ exports[`AppBar component renders if given, with content in the actions slot 1`]
exports[`AppBar component renders if given, with content in the content slot 1`] = `
<div class="" displayviewmodeswitch="false" id="files-app-bar">
<oc-hidden-announcer-stub announcement="No items selected." level="polite"></oc-hidden-announcer-stub>
<div style="height: 114px;"></div>
<div class="files-topbar oc-py-s">
<h1 class="oc-invisible-sr">ExampleTitle</h1>
<div class="oc-flex oc-flex-middle files-app-bar-controls oc-flex-right">
Expand Down

0 comments on commit 36e72d5

Please sign in to comment.