-
Notifications
You must be signed in to change notification settings - Fork 0
fix: polish pass — label noise, drag handle, toast spacing (#522) #563
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,7 @@ export function createCardActions(state: BoardState, helpers: BoardHelpers) { | |
| const newCard = await cardsApi.createCard(boardId, card) | ||
| state.currentBoardCards.value.push(newCard) | ||
| helpers.updateColumnCardCount(newCard.columnId, 1) | ||
| helpers.toast.success(`Card "${newCard.title}" created successfully`) | ||
| helpers.toast.success(`Card "${newCard.title.trim()}" created successfully`) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change correctly trims the whitespace for the toast message, but the underlying card data in the state and on the server will still contain the whitespace. This can lead to inconsistent display of the card title. A more robust fix would be to trim the title before sending it to the API. This ensures data consistency across the application. You could modify the async function createCard(boardId: string, card: CreateCardDto) {
// ...
const cardData = { ...card, title: card.title.trim() };
const newCard = await cardsApi.createCard(boardId, cardData);
state.currentBoardCards.value.push(newCard);
helpers.updateColumnCardCount(newCard.columnId, 1);
// The title from `newCard` should now be trimmed, so no .trim() is needed here.
helpers.toast.success(`Card "${newCard.title}" created successfully`);
// ...
}This would fix the issue at its source. |
||
| return newCard | ||
| } catch (e: unknown) { | ||
| helpers.handleApiError(e, 'Failed to create card') | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation can be simplified by setting
opacity: 0on the base.td-board-card__drag-labelclass and removing thetd-board-card__drag-label--hiddenclass modifier. This makes the template cleaner and the CSS more direct.To apply this, you would:
td-board-card__drag-label--hiddenclass from the<span>in the template (line 86).