Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
R1c4rdCo5t4 committed Jun 5, 2024
1 parent 8c7e0d8 commit c7d01f9
Show file tree
Hide file tree
Showing 28 changed files with 11 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { deleteAroundSelection } from '@domain/editor/fugue/operations/markdown/
import { Communication } from '@services/communication/communication';
import { Operation } from '@notespace/shared/src/document/types/operations';
import { isSelectionEmpty } from '@domain/editor/slate/utils/selection';
import { isEqual } from 'lodash';

/**
* Handlers for markdown operations
Expand Down Expand Up @@ -70,9 +71,9 @@ export default (fugue: Fugue, { socket }: Communication): MarkdownDomainOperatio
function deleteBlockStyles(selection: Selection) {
if (isSelectionEmpty(selection)) return;
const { start, end } = selection;

// Remove block styles if the selection is single position at beginning of a line or multi-line selection
if ((start === end && start.column === 0) || start.line !== end.line) {
const inStartOfLine = isEqual(start, end) && start.column === 0;
const isMultiLine = start.line !== end.line;
if (inStartOfLine || isMultiLine) {
const newSelection = start.column !== 0 ? { start: { line: start.line + 1, column: 0 }, end } : selection;
const operations = fugue.updateBlockStylesLocalBySelection('paragraph', newSelection);
socket.emit('operations', operations);
Expand Down
1 change: 1 addition & 0 deletions code/client/src/ui/components/table/DataTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

> div:first-child {
background-color: black;
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.1);
color: white;
}

Expand Down

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions code/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"keywords": [],
"scripts": {
"serve": "tsc && node dist/server.js",
"start": "tsx watch -r tsconfig-paths/register src/ts/server.ts",
"start:dev": "tsx watch -r tsconfig-paths/register src/ts/server.ts -test",
"start": "tsx watch -r tsconfig-paths/register src/server.ts prod",
"dev": "tsx watch -r tsconfig-paths/register src/server.ts dev",
"test": "jest --detectOpenHandles --config jest.config.js",
"knip": "knip",
"format": "prettier --write . && eslint . --ext .ts"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PromiseRouter from 'express-promise-router';
import resourcesHandlers from '@controllers/http/operations/resourcesHandlers';
import resourcesHandlers from '@controllers/http/handlers/resourcesHandlers';
import { httpResponse } from '@controllers/http/utils/httpResponse';
import { Request, Response } from 'express';
import { WorkspaceInputModel, WorkspaceMeta } from '@notespace/shared/src/workspace/types/workspace';
Expand Down
4 changes: 2 additions & 2 deletions code/server/src/controllers/http/router.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import express from 'express';
import PromiseRouter from 'express-promise-router';
import { Services } from '@services/Services';
import workspacesHandlers from '@controllers/http/operations/workspacesHandlers';
import errorHandler from '@controllers/http/operations/errorHandler';
import workspacesHandlers from '@controllers/http/handlers/workspacesHandlers';
import errorHandler from '@controllers/http/handlers/errorHandler';
import { Server } from 'socket.io';

export default function (services: Services, io: Server) {
Expand Down
2 changes: 1 addition & 1 deletion code/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ProductionDatabases } from '@databases/ProductionDatabases';
*/
function bootServer(args: string[]): void {
// validate server mode
const mode = args[0];
const mode = args[0] || 'prod';
if (args.length > 0 && mode !== 'dev' && mode !== 'prod') {
ServerLogger.logError('Invalid server mode. Use "dev" or "prod"');
process.exit(1);
Expand Down
File renamed without changes.
File renamed without changes.
Binary file added docs/deliveries/demo_report.pdf
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added docs/deliveries/progress_presentation.pdf
Binary file not shown.
File renamed without changes.
Binary file added docs/deliveries/project_proposal_presentation.pdf
Binary file not shown.
Binary file removed docs/misc/NoteSpaceProjectProposalPresentation.pptx
Binary file not shown.
File renamed without changes.

0 comments on commit c7d01f9

Please sign in to comment.