Issue #1

Daily Issue #1

🎆 News, Innovations, and Trends

🧰 Coding Toolbox

  • With Decode FormData, you can convert encoded form data back into a JavaScript object, recovering any information lost during the encoding process for server communication

  • Api-Fiddle is a cool playground for REST(ish) APIs where you can design endpoints for technical docs and collaborate with others.

  • Flowmodor is a flexible focus timer designed to help you stay in a flow state.

  • Another database, FerretDB, that acts like MongoDB but uses Postgres for storage has been updated to version 1.23

  • pgAdmin is also seeing a version bump to v8.10

  • Another lightweight drag-n-drop library, Dragula, offers super easy implementation.

#️⃣ Do you AI prompt?

Act as an Excel Sheet

I want you to act as a text based excel. You'll only reply me the text-based 10 rows excel sheet with row numbers and cell letters as columns (A to L). First column header should be empty to reference row number. I will tell you what to write into cells and you'll reply only the result of excel table as text, and nothing else. Do not write explanations. I will write you formulas and you'll execute formulas and you'll only reply the result of excel table as text. First, reply me the empty sheet.

💻 Code Snippets

Problem: I was setting up columns for my progress-tracking kanban app. Each column needed to hold cards for individual tasks, and I wanted to make sure each card could be drag-and-dropped onto any column. I also needed to be able to sort the columns.

Solution: With so many frameworks and libraries out there, I found a super tiny one (Dragula) that had all the functionality I needed to get the job done

let $columns = document.querySelectorAll('.column');

//cards
let cards = dragula(columns, {
	removeOnSpill: false,
	revertOnSpill: true
})
	.on('drag', card => {
		$columns.forEach(col => col.classList.add('visible'));
	})
	.on('cancel', card => {
		$columns.forEach(col => col.classList.remove('visible'));
	})
	.on('drop', card => {
		$columns.forEach(col => col.classList.remove('visible'));
		onCardDrop(card);
	});

//columns
let columns = dragula([document.querySelector('.board')], {
	removeOnSpill: false,
	revertOnSpill: true,
	direction: 'horizontal',
	moves:  (el, container, handle) => {
		return handle.classList.contains('column-header');
	}
})
	.on('drop', onColumnDrop);

Reply

or to participate.