add full screen view for task description

This commit is contained in:
marlon-erler
2026-09-22 21:33:20 +02:00
parent 3a2569b24e
commit d92a13dadb
11 changed files with 87 additions and 22 deletions
+22 -14
View File
@@ -1274,7 +1274,7 @@
this.connectionModel = connectionModel2; this.connectionModel = connectionModel2;
this.chatListModel = chatListModel2; this.chatListModel = chatListModel2;
this.fileTransferModel = fileTransferModel2; this.fileTransferModel = fileTransferModel2;
this.BUILD = "Build 26.09.21.C"; this.BUILD = "Build 26.09.22.A";
// CONTEXT // CONTEXT
this.contextStack = /* @__PURE__ */ new Map(); this.contextStack = /* @__PURE__ */ new Map();
this.closeContext = (contextId, fromHistoryEvent = false) => { this.closeContext = (contextId, fromHistoryEvent = false) => {
@@ -1289,7 +1289,9 @@
} }
}; };
this.handleKeyDown = (e) => { this.handleKeyDown = (e) => {
if (!(e instanceof KeyboardEvent)) return console.trace("NOT A KEY EVENT");
if (_CoreViewModel.checkIsKeystroke(e) == false) return; if (_CoreViewModel.checkIsKeystroke(e) == false) return;
console.log(e.key);
e.preventDefault(); e.preventDefault();
const contexts = this.contexts; const contexts = this.contexts;
while (contexts.length > 0) { while (contexts.length > 0) {
@@ -1313,10 +1315,6 @@
}; };
// DRAG & DROP // DRAG & DROP
this.draggedObject = new State(void 0); this.draggedObject = new State(void 0);
// SUGGESTIONS
// boards & tasks
this.taskCategorySuggestions = new ListState();
this.taskStatusSuggestions = new ListState();
this.translations = allTranslations[settingsModel2.language] || allTranslations.en; this.translations = allTranslations[settingsModel2.language] || allTranslations.en;
document.body.addEventListener("keydown", this.handleKeyDown); document.body.addEventListener("keydown", this.handleKeyDown);
window.onpopstate = () => { window.onpopstate = () => {
@@ -2345,8 +2343,15 @@
this.handleFileContent = (fileContent) => { this.handleFileContent = (fileContent) => {
const didStore = this.storeFileContent(fileContent); const didStore = this.storeFileContent(fileContent);
if (didStore == false) return; if (didStore == false) return;
switch (fileContent.type) {
case "board-info":
case "task":
this.boardsAndTasksModel.handleFileContent(fileContent); this.boardsAndTasksModel.handleFileContent(fileContent);
break;
case "reaction":
this.chatModel.handleReaction(fileContent); this.chatModel.handleReaction(fileContent);
break;
}
}; };
// methods // methods
this.addFileContentAndSend = (fileContent) => { this.addFileContentAndSend = (fileContent) => {
@@ -2839,15 +2844,15 @@
this.index.value = index; this.index.value = index;
}; };
this.updateSuggestions = () => { this.updateSuggestions = () => {
if (this.coreViewModel.taskCategorySuggestions.value.has( if (this.containingViewModel.taskCategorySuggestions.value.has(
this.category.value this.category.value
) == false) { ) == false) {
this.coreViewModel.taskCategorySuggestions.add(this.category.value); this.containingViewModel.taskCategorySuggestions.add(this.category.value);
} }
if (this.coreViewModel.taskStatusSuggestions.value.has( if (this.containingViewModel.taskStatusSuggestions.value.has(
this.status.value this.status.value
) == false) { ) == false) {
this.coreViewModel.taskStatusSuggestions.add(this.status.value); this.containingViewModel.taskStatusSuggestions.add(this.status.value);
} }
}; };
// settings // settings
@@ -2964,6 +2969,8 @@
); );
this.selectedTaskViewModel = new State(void 0); this.selectedTaskViewModel = new State(void 0);
this.taskViewModels = new MapState(); this.taskViewModels = new MapState();
this.taskCategorySuggestions = new ListState();
this.taskStatusSuggestions = new ListState();
// methods // methods
this.createTaskFromBoardId = (boardId) => { this.createTaskFromBoardId = (boardId) => {
const taskFileContent = this.boardsAndTasksModel.createTask(boardId); const taskFileContent = this.boardsAndTasksModel.createTask(boardId);
@@ -3180,6 +3187,7 @@
this, this,
taskFileContent taskFileContent
); );
console.log("STILL HERE", taskFileContent.fileId);
this.taskViewModels.set(taskFileContent.fileId, taskViewModel); this.taskViewModels.set(taskFileContent.fileId, taskViewModel);
}; };
this.removeTaskFromView = (taskFileContent) => { this.removeTaskFromView = (taskFileContent) => {
@@ -3303,7 +3311,7 @@
this.registerKeyStroke("backspace" /* CloseOrCancel */, this.hideFilterModal); this.registerKeyStroke("backspace" /* CloseOrCancel */, this.hideFilterModal);
this.registerKeyStroke("," /* Settings */, this.showSettings); this.registerKeyStroke("," /* Settings */, this.showSettings);
this.registerKeyStroke("enter" /* Apply */, this.hideSettings); this.registerKeyStroke("enter" /* Apply */, this.hideSettings);
this.registerKeyStroke(";" /* Create */, this.createTask); this.registerKeyStroke("a" /* Create */, this.createTask);
this.registerKeyStroke( this.registerKeyStroke(
"j", "j",
() => this.selectedPage.value = "list" /* List */ () => this.selectedPage.value = "list" /* List */
@@ -4277,7 +4285,7 @@
} }
}); });
this.registerKeyStroke("-" /* Reset */, this.resetFilter); this.registerKeyStroke("-" /* Reset */, this.resetFilter);
this.registerKeyStroke(";" /* Create */, this.setFocus); this.registerKeyStroke("a" /* Create */, this.setFocus);
this.chatViewModel.registerContext("messages" /* Messages */, this); this.chatViewModel.registerContext("messages" /* Messages */, this);
} }
}; };
@@ -4444,7 +4452,7 @@
this.registerKeyStroke("-" /* Reset */, this.showToday); this.registerKeyStroke("-" /* Reset */, this.showToday);
this.registerKeyStroke("k", this.showPreviousMonth); this.registerKeyStroke("k", this.showPreviousMonth);
this.registerKeyStroke("l", this.showNextMonth); this.registerKeyStroke("l", this.showNextMonth);
this.registerKeyStroke(";" /* Create */, this.createEvent); this.registerKeyStroke("a" /* Create */, this.createEvent);
this.chatViewModel.registerContext("calendar" /* Calendar */, this); this.chatViewModel.registerContext("calendar" /* Calendar */, this);
} }
// data // data
@@ -5445,7 +5453,7 @@
hidden: true, hidden: true,
id: categorySuggestionId, id: categorySuggestionId,
"children:append": [ "children:append": [
taskViewModel.coreViewModel.taskCategorySuggestions, taskViewModel.containingViewModel.taskCategorySuggestions,
StringToOption StringToOption
] ]
} }
@@ -5461,7 +5469,7 @@
hidden: true, hidden: true,
id: statusSuggestionId, id: statusSuggestionId,
"children:append": [ "children:append": [
taskViewModel.coreViewModel.taskStatusSuggestions, taskViewModel.containingViewModel.taskStatusSuggestions,
StringToOption StringToOption
] ]
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
+36 -3
View File
@@ -25,9 +25,9 @@ export function TaskSettingsModal(
}; };
return ( return (
<div class="modal task-settings" open> <div class="modal task-settings" open toggle:full-description={taskViewModel.isPresentingFullScreenDescription}>
<div> <div>
<main> <main id="standard-main">
<h2> <h2>
{ {
coreViewModel.translations.chatPage.task coreViewModel.translations.chatPage.task
@@ -89,6 +89,18 @@ export function TaskSettingsModal(
></textarea> ></textarea>
</div> </div>
</label> </label>
<div class="flex-row justify-end">
<button
class="width-50"
on:click={taskViewModel.openFullscreenDecription}
>
{
coreViewModel.translations.chatPage.task.taskDescriptionExpandButton
}
<span class="icon">fullscreen</span>
</button>
</div>
</div> </div>
<hr class="mobile-only"></hr> <hr class="mobile-only"></hr>
@@ -228,7 +240,28 @@ export function TaskSettingsModal(
)} )}
</div> </div>
</main> </main>
<div class="flex-row width-100"> <main id="fullscreen-main">
<textarea
style="height: 100%; width: 100%; max-width: unset"
bind:value={taskViewModel.description}
></textarea>
</main>
<div
class="flex-row width-100"
id="fullscreen-exit"
>
<button
class="flex"
on:click={taskViewModel.closeFullscreenDecription}
>
{coreViewModel.translations.general.exitButton}
<span class="icon">fullscreen_exit</span>
</button>
</div>
<div
class="flex-row width-100"
id="controls"
>
<button <button
class="flex" class="flex"
on:click={taskViewModel.closeAndDiscard} on:click={taskViewModel.closeAndDiscard}
+12
View File
@@ -266,3 +266,15 @@ button
flex: 1; flex: 1;
} }
} }
.modal.task-settings:not([full-description]) :is(#fullscreen-exit, #fullscreen-main) {
display: none;
}
.modal.task-settings[full-description] :is(#controls, #standard-main) {
display: none;
}
.modal.task-settings[full-description] > div {
height: 100%;
}
+2
View File
@@ -14,6 +14,7 @@ const englishTranslations = {
cancelButton: "Cancel", cancelButton: "Cancel",
closeButton: "Close", closeButton: "Close",
deleteButton: "Delete", deleteButton: "Delete",
exitButton: "Exit",
continueButton: "Continue", continueButton: "Continue",
confirmButton: "Confirm", confirmButton: "Confirm",
@@ -285,6 +286,7 @@ const englishTranslations = {
taskPriorityLabel: "Priority", taskPriorityLabel: "Priority",
taskDescriptionLabel: "Description", taskDescriptionLabel: "Description",
taskDescriptionExpandButton: "Fullscreen",
taskDateLabel: "Date", taskDateLabel: "Date",
taskTimeLabel: "Time", taskTimeLabel: "Time",
+1 -1
View File
@@ -9,7 +9,7 @@ import ConnectionModel from "../../Model/Global/connectionModel";
import ChatListModel from "../../Model/Chat/chatListModel"; import ChatListModel from "../../Model/Chat/chatListModel";
export default class CoreViewModel { export default class CoreViewModel {
readonly BUILD = "Build 26.09.21.C"; readonly BUILD = "Build 26.09.22.A";
translations: Translations; translations: Translations;
Binary file not shown.
+10
View File
@@ -58,6 +58,8 @@ export default class TaskViewModel extends Context {
selectedVersionId: React.State<string> = new React.State(""); selectedVersionId: React.State<string> = new React.State("");
versionIds: React.ListState<string> = new React.ListState(); versionIds: React.ListState<string> = new React.ListState();
isPresentingFullScreenDescription: React.State<boolean> = new React.State(false);
// methods // methods
dragStart = (event: DragEvent): void => { dragStart = (event: DragEvent): void => {
ViewController.allowDrag(event); ViewController.allowDrag(event);
@@ -96,6 +98,14 @@ export default class TaskViewModel extends Context {
this.save(); this.save();
}; };
openFullscreenDecription = (): void => {
this.isPresentingFullScreenDescription.value = true;
}
closeFullscreenDecription = (): void => {
this.isPresentingFullScreenDescription.value = false;
}
updateIndex = (): void => { updateIndex = (): void => {
const index: number = const index: number =
this.containingViewModel.taskIndexManager.getIndex(this); this.containingViewModel.taskIndexManager.getIndex(this);