Skip to content

Missing Colored Borders in the Trash View #76

@annrose2277-glitch

Description

@annrose2277-glitch

Describe the bug
in the renderTrash() function, you render the labels inside the card but forgot to apply the data-labels attribute to the main card container itself.In your standard Notes view, notes with labels get a nice colored border on the left side. This is handled by your CSS looking for the data-labels attribute on the note card.

To Reproduce
/* BEFORE */
if (noteLabels.length > 0) {
const labelsDiv = document.createElement("div");
labelsDiv.className = "note-labels";

/* AFTER */
if (noteLabels.length > 0) {
card.setAttribute('data-labels', noteLabels.join(' ')); // <-- Add this line
const labelsDiv = document.createElement("div");
labelsDiv.className = "note-labels";
Expected behavior
When you delete a labeled note and view it in the Trash, the card will now feature the correct colored left-hand border (e.g., red for Important, yellow for Work), keeping your UI visually consistent across all views.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions