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

Issue task PS-3781 : UI implementation for ASQ in Player #14

Merged
merged 2 commits into from
Feb 21, 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
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
<ng-container *ngIf="optionsShuffled && (layout === 'VERTICAL' || layout === 'DEFAULT')">
<div id="dragdropSpace" cdkDropList [cdkDropListData]="shuffledOptions" class="asq-horizontal-list" (cdkDropListDropped)="onDrop($event)">
<div class="asq-horizontal-box" *ngFor="let option of shuffledOptions" cdkDrag cdkDragBoundary="#dragdropSpace">
<div [innerHTML]="option.label"></div>
<quml-reorder></quml-reorder>
<div id="dragdropSpace" cdkDropList [cdkDropListData]="shuffledOptions" class="vertical-list" (cdkDropListDropped)="onDrop($event)">
<div class="box vertical-box" *ngFor="let option of shuffledOptions" cdkDrag>
<div class="content">
<div class="mt-1r" [innerHTML]="option.label"></div>
</div>
<div class="drag-handle" style="display: flex; align-items: center;">
<quml-reorder></quml-reorder>
</div>
</div>
</div>
</ng-container>
<ng-container *ngIf="optionsShuffled && (layout === 'HORIZONTAL')">



<ng-container *ngIf="optionsShuffled && layout === 'HORIZONTAL'">
<div id="dragdropSpace" cdkDropList cdkDropListOrientation="horizontal" [cdkDropListData]="shuffledOptions" class="horizontal-list" (cdkDropListDropped)="onDrop($event)">
<div class="asq-vertical-box" *ngFor="let option of shuffledOptions" cdkDrag cdkDragBoundary="#dragdropSpace">
<div class="drag-handle">
<div class="box horizontal-box" *ngFor="let option of shuffledOptions" cdkDrag>
<div class="content">
<div class="mt-1r" [innerHTML]="option.label"></div>
</div>
<div class="drag-handle" style="display: flex; align-items: center;">
<quml-reorder></quml-reorder>
</div>
<div [innerHTML]="option.label"></div>
</div>
</div>
</ng-container>




Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ height: 100vh;
}
.drag-handle{
position: absolute;
top: 5px;
top: 15px;
right: 5px;
cursor: move;
}
Expand All @@ -109,4 +109,79 @@ height: 100vh;
.horizontal-list{
padding:0px;
}
}















/* General Box Styles */
.box {
display: flex;
justify-content: space-between;
align-items: center;
// width: 250px;
width: 90%;
cursor: grab;
height: 60px;
padding: 12px;
border-left: 5px solid #99bcd8;
border-right: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
border-radius: 8px;
background: white;
// box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
font-weight: bold;
// transition: transform 0.2s ease-in-out;
position: relative;
}

/* Restricting drag to within the box */
.box cdkDrag {
width: 100%;
height: 100%;
}

/* Prevent dragging outside the box */
.cdk-drag-preview {
max-height: 60px;
}

/* List Styles */
.vertical-list {
display: flex;
flex-direction: column;
gap: 12px;
width:100%;
align-items: center;
}

.horizontal-list {
display: flex;
flex-direction: row;
gap: 12px;
}

/* Drag Handle Styling */
.drag-handle {
cursor: grab;
font-size: 18px;
padding: 5px;
display: flex;
align-items: center;
}

.mt-1r {
padding-top: 1rem !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ p {
align-items: center;
gap: 20px;
padding: 30px;
background: #f0f0f0;
// background: #f0f0f0;
border-radius: 20px;
}

Expand Down