-
Notifications
You must be signed in to change notification settings - Fork 370
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
Add improvement to tabbed page block configuration #1416
Add improvement to tabbed page block configuration #1416
Conversation
@@ -152,6 +152,7 @@ | |||
:bounding-rect="boundingRect" | |||
editable | |||
class="p-2" | |||
@edit-tab-item-block="(index) => editBlock(index)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edit-block="editBlock"
@@ -146,3 +192,14 @@ export default { | |||
}, | |||
} | |||
</script> | |||
|
|||
<style scoped> | |||
.tab-menu-item-tool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use only bootstrap except for text color when pills and active
/> | ||
</b-button> | ||
|
||
<b-button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use input confirm like toolbox does
<b-button | ||
:variant="block.options.style.appearance === 'pills' ? 'secondary' : 'primary'" | ||
size="sm" | ||
@click="onTabMenuEditItemClick(tab)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we call This editTabbedBlock?
|
||
<c-input-confirm | ||
class="ml-1" | ||
@confirmed="onTabMenuDeleteItemClick(index)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar for this, deleteTab
<b-button | ||
size="sm" | ||
variant="outline-light" | ||
class="edit-block-btn" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep it simple, you can do text-primary border-0 edit-block-btn
And just overwrite the color in the custom class
.tabs-base-block-container .nav-pills {
&.active .edit-block-btn {
color: $white !important;
}
}
06946e6
to
e66723d
Compare
const { blockID } = this.blocks[blockIndex] | ||
|
||
if (!blockID) return | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you have to loop through them, you have the index and the tabIndex, so that's all you need to splice it
> | ||
<div | ||
v-if="unsavedBlocks.has(tab.block.blockID !== '0' ? tab.block.blockID : tab.block.meta.tempID)" | ||
:title="$t('tooltip.unsavedChanges')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translation is missing here
@@ -653,6 +656,20 @@ export default { | |||
|
|||
this.blocks.splice(this.editor.index, 1, block) | |||
this.unsavedBlocks.add(fetchID(block)) | |||
|
|||
// Add the block that is a parent block is a tab to unsaved blocks registry0 | |||
this.blocks.forEach((block) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You dont need to do this, you can just add the parent block when you delete a tab.
572af9c
to
1e232a6
Compare
11cb415
to
31bc22d
Compare
The following changes are implemented
TODO: Summary
Changes in the user interface:
TODO: Add screenshots, recordings or remove this section
Checklist when submitting a final (!draft) PR