Skip to content

Feat/increase vertical gaps #238

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

Merged
merged 13 commits into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cypress/e2e/__image_snapshots__/Editable Label Self message #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cypress/e2e/__image_snapshots__/Smoke test fragment #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cypress/e2e/__image_snapshots__/Smoke test fragmentIssue #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cypress/e2e/__image_snapshots__/Smoke test interaction #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11,062 changes: 7,211 additions & 3,851 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/DiagramFrame/DiagramFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
/>
</div>
<div
class="footer text-skin-control bg-skin-title px-4 py-1 flex justify-between items-center gap-3"
class="footer rounded text-skin-control bg-skin-title px-4 py-1 flex justify-between items-center gap-3"
>
<template v-if="mode === RenderMode.Dynamic">
<div class="flex items-center gap-3 color-base">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="block" :data-origin="origin">
<div
class="statement-container mt-1"
class="statement-container my-4"
:data-origin="origin"
v-for="(stat, index) in statements"
:key="index"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div
class="occurrence shadow-occurrence border-skin-occurrence bg-skin-occurrence rounded-sm border-2 relative left-full"
class="occurrence min-h-6 shadow-occurrence border-skin-occurrence bg-skin-occurrence rounded-sm border-2 relative left-full"
:class="{ 'right-to-left': rtl }"
data-el-type="occurrence"
:data-belongs-to="participant"
Expand Down Expand Up @@ -68,8 +68,7 @@ export default {
let len = stats.length;
if (len > 1) return true;
//when the only one statement is not the RetContext
if (len == 1 && stats[0]["ret"]() == null) return true;
return false;
return len === 1 && stats[0]["ret"]() == null;
},
},
// The following code will cause the Block to be created and mounted AFTER the occurrence (and upto DiagramFrame) is updated.
Expand Down Expand Up @@ -100,34 +99,15 @@ export default {
<style scoped>
.occurrence {
width: 15px;
/* To offset Message's border-bottom width.
Use margin-top with relative set to save 2px at the bottom of the Occurrence.
If we use `top: -2px`, the 2px will still be occupied. It would have just shift the occurrence up. */
margin-top: -2px;
/* 6 = (OccurrenceWidth(15)+1)/2 - OccurrenceBorderWidth(2)*/
padding: 16px 0 16px 6px;
}

:deep(> .statement-container:last-child > .interaction.return:last-of-type) {
margin-bottom: 0;
border-bottom: 0;
transform: translateY(1px);
}

:deep(
> .statement-container:last-child
> .interaction.return:last-of-type
> .message
) {
bottom: -17px;
/* Move the absolutely positioned return message to the bottom. -17 to offset the padding of Occurrence. */
/* height: 0; */
padding-left: 6px;
}

.right-to-left.occurrence {
left: -14px;
}
</style>

<style>
.occurrence {
margin-top: -2px;
/* To offset Message's border-bottom width */
}
</style>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<!-- style border-width means not to be overridden. -->
<div
class="self-invocation message self flex items-start flex-col"
class="self-invocation message leading-none self flex items-start flex-col"
style="border-width: 0"
@click="onClick"
ref="messageRef"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div
class="message border-skin-message-arrow border-b-2 flex items-end"
class="message leading-none border-skin-message-arrow border-b-2 flex items-end"
:class="{
'flex-row-reverse': rtl,
return: type === 'return',
Expand Down Expand Up @@ -28,14 +28,14 @@
{{ content }}
</template>
</div>
<Numbering :number="number" />
</div>
</div>
<point
class="flex-shrink-0 transform translate-y-1/2 -my-px"
:fill="fill"
:rtl="rtl"
/>
<Numbering :number="number" />
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,11 @@ export default {
},
};
</script>

<style scoped>
.occurrence > .block > .statement-container:last-child > .interaction.return {
/* It pulls up the parent's (.statement-container) bottom margin. */
margin-bottom: -16px;
bottom: -2px; /* The width of the border of the Occurrence */
}
</style>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
v-if="numbering"
class="absolute right-[100%] top-0 pr-1 group-hover:hidden text-gray-500 font-thin leading-6"
class="absolute text-xs right-[100%] top-0 pr-1 group-hover:hidden text-gray-500 font-thin"
>
{{ number }}
</div>
Expand Down