Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Add file path and line for comments with code locations
Merged did:key:z6MkkfM3...sVz5 opened 10 months ago

Instead of only displaying a comment, we need to make sure users know that this has been a line comment.

Linking to changes for the display of the comment is a bit trickier, will do so in a follow up


Stop propagation of Link click

By not stopping the propagation of the click event on Link components weird things happen around the app like i.e. the Popover component things someone clicked outside and updates the url hash.

We should make sure to only propagate clicks where needed.

check check-visual check-unit-test check-http-client-unit-test check-radicle-httpd check-e2e check-build check-http

πŸ‘‰ Preview πŸ‘‰ Workflow runs πŸ‘‰ Branch on GitHub

did:key:z6MkkfM3...sVz5 opened with revision e68bf3fc on base 33b8ecde +54 -0 10 months ago

Instead of only displaying a comment, we need to make sure users know that this has been a line comment.

Linking to changes for the display of the comment is a bit trickier, will do so in a follow up


Stop propagation of Link click

By not stopping the propagation of the click event on Link components weird things happen around the app like i.e. the Popover component things someone clicked outside and updates the url hash.

We should make sure to only propagate clicks where needed.

check check-visual check-unit-test check-http-client-unit-test check-radicle-httpd check-e2e check-build check-http

πŸ‘‰ Preview πŸ‘‰ Workflow runs πŸ‘‰ Branch on GitHub

rudolfs pushed revision 2 6d1e5bd6 on base 0603f63c +54 -0 10 months ago

Rebase

rudolfs reviewed Β· 2 comments 10 months ago

Nice! There’s something off with e2e tests and possibly visual specs. Could we apply these changes? I find it works better in-line on the web.

diff --git a/src/components/Comment.svelte b/src/components/Comment.svelte
index afa74a12..dcc09418 100644
--- a/src/components/Comment.svelte
+++ b/src/components/Comment.svelte
@@ -62,14 +62,10 @@
     gap: 0.5rem;
     font-size: var(--font-size-small);
   }
-  :global(.code-location-header) {
-    width: fit-content;
-    font-size: var(--font-size-small);
-    padding: 0.25rem 0.75rem;
-    padding-left: 2.25rem;
-  }
-  :global(.code-location) {
+  .code-location {
+    font-family: var(--font-family-monospace);
     background-color: var(--color-fill-ghost);
+    font-size: var(--font-size-tiny);
     border-radius: var(--border-radius-tiny);
     padding: 0.125rem 0.25rem;
   }
@@ -134,8 +130,13 @@
     {#if isLastReply}
       <div class="connector-line"></div>
     {/if}
-    {#if location}
-      <div class="code-location-header txt-monospace">
+    <div class="card-header" class:card-header-no-icon={isReply}>
+      <slot class="icon" name="icon" />
+      <NodeId {baseUrl} nodeId={authorId} alias={authorAlias} />
+      <slot name="caption">{caption}</slot>
+      <Id {id} />
+      {#if location}
+        on change
         <div class="code-location">
           {#if location.path && selectionRange}
             <div class="comment-header">
@@ -152,13 +153,7 @@
             </div>
           {/if}
         </div>
-      </div>
-    {/if}
-    <div class="card-header" class:card-header-no-icon={isReply}>
-      <slot class="icon" name="icon" />
-      <NodeId {baseUrl} nodeId={authorId} alias={authorAlias} />
-      <slot name="caption">{caption}</slot>
-      <Id {id} />
+      {/if}
       <span class="timestamp" title={utils.absoluteTimestamp(timestamp)}>
         {utils.formatTimestamp(timestamp)}
       </span>

did:key:z6MkkfM3...sVz5 pushed revision 3 83b27b3a on base 0603f63c +49 -3 10 months ago

Address feedback by rudolfs

did:key:z6MkkfM3...sVz5 pushed revision 4 08087aff on base 0603f63c +47 -0 10 months ago

Removed stop propagation in Link

rudolfs accepted 10 months ago
rudolfs merged revision 08087aff at 18afaa12 10 months ago