-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Element dialog split & unplaced elements re-arrangement (#471)
* - move unplaced learning elements to bottom container - separate learning elements and adaptivity elements in two different tabs * CenterContainer - optimized width * Full width for ElementFormContainer * Changed display of 3d representation * implemented fully fluid layout and styled UnplacedElementsDropZone.razor * fixed initial scrollbar behaviour of LearningSpaceLayoutView.razor in smallest screen size possible * fix ui tests * -add some tests -add localization for unplaced elements component * update changelog --------- Co-authored-by: Andreas Weishaupt <andreas-93@web.de> Co-authored-by: e01118 <e01118@th-ab.de> Co-authored-by: splican <daniel2105@gmx.net>
- Loading branch information
1 parent
55bf40b
commit 6855b8d
Showing
36 changed files
with
429 additions
and
128 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Presentation/Components/ContentFiles/ContentFilesContainer.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
Presentation/Components/Forms/Element/UnplacedElementsDropZone.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@using Presentation.PresentationLogic.LearningWorld | ||
@using Presentation.PresentationLogic.SelectedViewModels | ||
@using Presentation.View.LearningElement | ||
@using Microsoft.Extensions.Localization | ||
@using System.ComponentModel | ||
@using System.Diagnostics.CodeAnalysis | ||
@using Presentation.PresentationLogic.LearningElement | ||
<div class="flex flex-col items-center h-full bg-adlerdeactivated rounded-lg px-1.5"> | ||
<p class="cursor-default text-xs h-1/4 2xl:text-sm text-center mx-1 py-2 flex-auto basis-1/5 text-adlergrey-500 font-bold">@Localizer["UnplacedElementsDropZone.Title"]</p> | ||
<MudDropZone T="ILearningElementViewModel" Identifier="unplacedElements" | ||
Class="overflow-y-auto overflow-x-hidden flex-wrap rounded-lg flex-auto basis-4/5 border-2 border-solid p-2 mb-2 gap-4 bg-white flex flex-row justify-center w-full"> | ||
<ItemRenderer> | ||
<DragDropLearningElement | ||
LearningElement="@context" | ||
OnShowLearningElementContent="@WorldPresenter.ShowSelectedElementContentAsync" | ||
OnEditLearningElement="@WorldPresenter.SetSelectedLearningElement" | ||
OnDeleteLearningElement="@WorldPresenter.DeleteLearningElement" | ||
OnClicked="@WorldPresenter.SetSelectedLearningElement"/> | ||
</ItemRenderer> | ||
</MudDropZone> | ||
</div> | ||
|
||
@code { | ||
|
||
[Inject, AllowNull] //can never be null, DI will throw exception on unresolved types | ||
public ILearningWorldPresenter WorldPresenter { get; set; } | ||
|
||
|
||
[Inject, AllowNull] //can never be null, DI will throw exception on unresolved types | ||
private IStringLocalizer<UnplacedElementsDropZone> Localizer { get; set; } | ||
|
||
|
||
[Inject, AllowNull] //can never be null, DI will throw exception on unresolved types | ||
public ISelectedViewModelsProvider SelectedViewModelsProvider { get; set; } | ||
|
||
protected override void OnParametersSet() | ||
{ | ||
base.OnParametersSet(); | ||
if (SelectedViewModelsProvider.LearningWorld != null) SelectedViewModelsProvider.PropertyChanged += SelectedViewModelsProviderOnPropertyChanged; | ||
} | ||
|
||
private async void SelectedViewModelsProviderOnPropertyChanged(object? sender, PropertyChangedEventArgs e) | ||
{ | ||
await InvokeAsync(StateHasChanged); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.