back interdiff of round #5 and #4

appview: add reaction for issues/PRs (close #65) #265

merged
opened by boltless.me targeting master from boltless.me/core: push-uoymosxlmxvl

Add sh.tangled.feed.reaction lexicon and UI to react to issues/PRs close #65 close #113

Signed-off-by: Seongmin Lee boltlessengineer@proton.me

files
api
appview
db
issues
pages
templates
layouts
repo
fragments
issues
pulls
fragments
pulls
state
cmd
lexicons
ERROR
api/tangled/cbor_gen.go

Failed to calculate interdiff for this file.

ERROR
api/tangled/feedreaction.go

Failed to calculate interdiff for this file.

ERROR
appview/db/db.go

Failed to calculate interdiff for this file.

ERROR
appview/db/issues.go

Failed to calculate interdiff for this file.

ERROR
appview/db/reaction.go

Failed to calculate interdiff for this file.

ERROR
appview/issues/issues.go

Failed to calculate interdiff for this file.

ERROR
appview/pages/pages.go

Failed to calculate interdiff for this file.

ERROR
appview/pages/templates/layouts/repobase.html

Failed to calculate interdiff for this file.

REVERTED
appview/pages/templates/repo/issues/fragments/reaction.html
··· 1 - {{ define "repo/issues/fragments/reaction" }} 2 - <button 3 - id="reactIndi-{{ .Kind }}" 4 - class="flex justify-center items-center min-w-8 min-h-8 rounded border 5 - leading-4 px-3 gap-1 6 - {{ if eq .Count 0 }} 7 - hidden 8 - {{ end }} 9 - {{ if .IsReacted }} 10 - bg-sky-100 11 - border-sky-400 12 - dark:bg-sky-900 13 - dark:border-sky-500 14 - {{ else }} 15 - border-gray-200 16 - hover:bg-gray-50 17 - hover:border-gray-300 18 - dark:border-gray-700 19 - dark:hover:bg-gray-700 20 - dark:hover:border-gray-600 21 - {{ end }} 22 - " 23 - {{ if .IsReacted }} 24 - hx-delete="/react?subject={{ .ThreadAt }}&kind={{ .Kind }}" 25 - {{ else }} 26 - hx-post="/react?subject={{ .ThreadAt }}&kind={{ .Kind }}" 27 - {{ end }} 28 - hx-swap="outerHTML" 29 - hx-trigger="click from:(#reactBtn-{{ .Kind }}, #reactIndi-{{ .Kind }})" 30 - hx-disabled-elt="this" 31 - > 32 - <span>{{ .Kind }}</span> <span>{{ .Count }}</span> 33 - </button> 34 - {{ end }}
ERROR
appview/pages/templates/repo/issues/issue.html

Failed to calculate interdiff for this file.

ERROR
appview/pages/templates/repo/pulls/fragments/pullHeader.html

Failed to calculate interdiff for this file.

ERROR
appview/pulls/pulls.go

Failed to calculate interdiff for this file.

ERROR
appview/state/reaction.go

Failed to calculate interdiff for this file.

ERROR
appview/state/router.go

Failed to calculate interdiff for this file.

ERROR
cmd/gen.go

Failed to calculate interdiff for this file.

ERROR
lexicons/feed/reaction.json

Failed to calculate interdiff for this file.

NEW
appview/pages/templates/repo/fragments/reaction.html
··· 1 + {{ define "repo/fragments/reaction" }} 2 + <button 3 + id="reactIndi-{{ .Kind }}" 4 + class="flex justify-center items-center min-w-8 min-h-8 rounded border 5 + leading-4 px-3 gap-1 6 + {{ if eq .Count 0 }} 7 + hidden 8 + {{ end }} 9 + {{ if .IsReacted }} 10 + bg-sky-100 11 + border-sky-400 12 + dark:bg-sky-900 13 + dark:border-sky-500 14 + {{ else }} 15 + border-gray-200 16 + hover:bg-gray-50 17 + hover:border-gray-300 18 + dark:border-gray-700 19 + dark:hover:bg-gray-700 20 + dark:hover:border-gray-600 21 + {{ end }} 22 + " 23 + {{ if .IsReacted }} 24 + hx-delete="/react?subject={{ .ThreadAt }}&kind={{ .Kind }}" 25 + {{ else }} 26 + hx-post="/react?subject={{ .ThreadAt }}&kind={{ .Kind }}" 27 + {{ end }} 28 + hx-swap="outerHTML" 29 + hx-trigger="click from:(#reactBtn-{{ .Kind }}, #reactIndi-{{ .Kind }})" 30 + hx-disabled-elt="this" 31 + > 32 + <span>{{ .Kind }}</span> <span>{{ .Count }}</span> 33 + </button> 34 + {{ end }}
NEW
appview/pages/templates/repo/fragments/reactionsPopUp.html
··· 1 + {{ define "repo/fragments/reactionsPopUp" }} 2 + <details 3 + id="reactionsPopUp" 4 + class="relative inline-block" 5 + > 6 + <summary 7 + class="flex justify-center items-center min-w-8 min-h-8 rounded border border-gray-200 dark:border-gray-700 8 + hover:bg-gray-50 9 + hover:border-gray-300 10 + dark:hover:bg-gray-700 11 + dark:hover:border-gray-600 12 + cursor-pointer list-none" 13 + > 14 + {{ i "smile" "size-4" }} 15 + </summary> 16 + <div 17 + class="absolute flex left-0 z-10 mt-4 rounded bg-white dark:bg-gray-800 dark:text-white border border-gray-200 dark:border-gray-700 shadow-lg" 18 + > 19 + {{ range $kind := . }} 20 + <button 21 + id="reactBtn-{{ $kind }}" 22 + class="size-12 hover:bg-gray-100 dark:hover:bg-gray-700" 23 + hx-on:click="this.parentElement.parentElement.removeAttribute('open')" 24 + > 25 + {{ $kind }} 26 + </button> 27 + {{ end }} 28 + </div> 29 + </details> 30 + {{ end }}