Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple fixes #6954

Merged
merged 6 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ export default {
...this.$_fileActions_loadExternalAppActions(this.filterParams.resources)
]

return [...fileHandlers].filter((item) => item.isEnabled(this.filterParams))
return [...fileHandlers]
.filter((item) => item.isEnabled(this.filterParams))
.sort((x, y) => Number(y.canBeDefault) - Number(x.canBeDefault))
elizavetaRa marked this conversation as resolved.
Show resolved Hide resolved
},

menuItemsShare() {
Expand Down
15 changes: 11 additions & 4 deletions packages/web-app-text-editor/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<main id="text-editor" class="oc-mx-l oc-my-m">
<main id="text-editor" class="oc-px-l oc-py-m oc-height-1-1">
<app-bar
:current-file-context="currentFileContext"
:is-loading="isLoading"
Expand All @@ -16,8 +16,8 @@
@close="clearLastError"
/>
</oc-notifications>
<div class="oc-flex">
<div :class="showPreview ? 'oc-width-1-2' : 'oc-width-1-1'">
<div class="oc-flex editor-wrapper-height">
<div :class="showPreview ? 'oc-width-1-2 oc-height-1-1' : 'oc-width-1-1 oc-height-1-1'">
elizavetaRa marked this conversation as resolved.
Show resolved Hide resolved
<oc-textarea
id="text-editor-input"
v-model="currentContent"
Expand Down Expand Up @@ -231,12 +231,19 @@ export default {
}
}
</script>
<style lang="scss" scoped>
<style lang="scss">
#text-editor-preview {
max-height: 80vh;
overflow-y: scroll;
}
#text-editor-input {
resize: vertical;
}
.editor-wrapper-height {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer working with a full-height parent element and paddings/margins instead. Do you think that could work?

Copy link
Member Author

@elizavetaRa elizavetaRa May 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the height is set 100% and the text is longer than the height of the textarea (scrollbar showing), the upper buttons div gets stagely cut by me, the only workaround I found was to subtract the height of the upper buttons, margins or paddings don't fix it
Screenshot from 2022-05-16 12-40-49

height: calc(100% - 42px);
}

#text-editor-input {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the oc-height-1-1 for this element also and remove the custom style rule? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I set the class, it sets the div around <textarea> to 100% but not <textarea> itself. So the class passing would need to be implemented in ocTextarea for this purpose.

height: 100%;
}
</style>
1 change: 1 addition & 0 deletions packages/web-pkg/src/components/sidebar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ export default defineComponent({

&__body {
overflow-y: auto;
overflow-x: hidden;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this prevent?

Copy link
Member Author

@elizavetaRa elizavetaRa May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pascalwengerter In case the email is long, the horizontal scroll appears. Happens to all emails at CERN, I described in #6973
Screenshot from 2022-05-13 16-28-42

padding: 10px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,13 @@ export default {
right: 1rem;
}
}

a.router-link-active,
elizavetaRa marked this conversation as resolved.
Show resolved Hide resolved
button.router-link-active {
&:focus,
&:hover {
color: var(--oc-color-swatch-inverse-default);
}
}
}
</style>