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
Improve tree view #87
Conversation
Update to latest trunk
Merging this to my release branch
I really like the "real tree" look, I'm not very fond of the Something funny happened with distances between elements (my 2.0.1 vs your treeview): |
Might also be the reason the new view occupies more vertical space. Was it intended change (i.e. for visual clarity?) or a unintended side-effect? |
Thank you for your feedback! |
I've update the feature branch with less distracting tree icons. I've deployed that version at https://olibu.github.io/asn1js/ Waiting for your feedback. |
There are a few "weird spots" where the tree lines have double width, can you check that? |
I do not see any of this "weird spots". Maybe it's dependent on the resolution? I'm using Chrome and Safari on a Mac. All changes are now available at https://github.com/olibu/asn1js/tree/feature/treeview |
I can reproduce the "weired spots" when zomming the page. Some zoom levels show the lines in different sizes. I will try to find a fix for this. |
@olibu I'm going to fix this squashed in a single commit, it would be too difficult to re-build all changes in single commits, I hope you don't mind. (I usually prefer 1:1 commits myself…) |
index.js
Outdated
@@ -231,3 +237,19 @@ selectTag.onchange = function (ev) { | |||
let tag = ev.target.selectedOptions[0].value; | |||
window.location.href = 'https://rawcdn.githack.com/lapo-luchini/asn1js/' + tag + '/index.html'; | |||
}; | |||
|
|||
// zoom fix to have straight lines in treeview |
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.
Is it possible to do this using CSS rules instead of custom JS?
Because I fear that direct style rules such as this would be stopped by CSP on official website.
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.
I added a version without JS. Looks fine on my screen.
From 64546e4 Date: Sun, 28 Jan 2024 18:17:45 +0100 Subject: [PATCH 01/25] hex copy on click From 151289b Date: Sun, 28 Jan 2024 22:08:09 +0100 Subject: [PATCH 02/25] Context menu and copyAsString added From 5efe7f7 Date: Mon, 29 Jan 2024 08:26:40 +0100 Subject: [PATCH 03/25] Context menu initially hidden From 36dd239 Date: Mon, 29 Jan 2024 13:28:54 +0100 Subject: [PATCH 04/25] Fix: Copy the string to clipboard From 01b1525 Date: Mon, 29 Jan 2024 13:31:51 +0100 Subject: [PATCH 05/25] New: Copy as pretty From 4978b90 Date: Mon, 29 Jan 2024 13:33:13 +0100 Subject: [PATCH 06/25] New: Align context menu to left From c7cc3ba Date: Mon, 29 Jan 2024 18:48:31 +0100 Subject: [PATCH 07/25] Negative list for set and sequence From c69ed8d Date: Mon, 29 Jan 2024 18:52:28 +0100 Subject: [PATCH 08/25] Fix: Show context menu at correct position From 0b9b3f3 Date: Mon, 29 Jan 2024 19:22:45 +0100 Subject: [PATCH 09/25] Simple marker with toggle method From 8eb7457 Date: Wed, 31 Jan 2024 19:50:58 +0100 Subject: [PATCH 10/25] Indention fixed From 80e7a8b Date: Sun, 31 Mar 2024 19:35:37 +0200 Subject: [PATCH 11/25] Menu added to tree view From 6dcb057 Date: Sun, 31 Mar 2024 22:09:03 +0200 Subject: [PATCH 12/25] Pretty text from innerText From 88d7afd Date: Wed, 10 Apr 2024 21:01:10 +0200 Subject: [PATCH 13/25] new: tree view From 59d44dc Date: Fri, 19 Apr 2024 15:42:51 +0200 Subject: [PATCH 14/25] Only highlight the current selected node From 1dc1323 Date: Fri, 19 Apr 2024 15:48:44 +0200 Subject: [PATCH 15/25] smaller padding as of tree layout From 60383f9 Date: Fri, 19 Apr 2024 16:17:50 +0200 Subject: [PATCH 16/25] Smaller borders and icon From a6cf850 Date: Fri, 19 Apr 2024 16:31:23 +0200 Subject: [PATCH 17/25] do not show the menu in case of clicking the icon From 174df2c Date: Fri, 19 Apr 2024 16:38:45 +0200 Subject: [PATCH 18/25] Installation of node to execute lint correctly From 48fbe0b Date: Fri, 19 Apr 2024 16:38:54 +0200 Subject: [PATCH 19/25] Singlequotes From fbd2b26 Date: Sat, 20 Apr 2024 13:33:30 +0200 Subject: [PATCH 20/25] Only show context menu on highlighted element From ea3c28f Date: Sat, 20 Apr 2024 14:09:29 +0200 Subject: [PATCH 21/25] Less offensive tree icons From 1f9913c Date: Sat, 20 Apr 2024 14:28:33 +0200 Subject: [PATCH 22/25] Original layout recovered From 0d84f33 Date: Sat, 20 Apr 2024 15:02:26 +0200 Subject: [PATCH 23/25] Layout issue fixed From ba21d40 Date: Mon, 22 Apr 2024 19:46:31 +0200 Subject: [PATCH 24/25] Fix: Zoom issues of the border line in treeview From d303e65 Date: Tue, 23 Apr 2024 09:35:51 +0200 Subject: [PATCH 25/25] Indentation fixed
BTW: I squashed your branch in 76b5048 (and partially merged to current trunk). |
I merged this PR in branch github-87, which can be tested online on githack. |
The branch looks fine to me. The githack link however has some CSS issues. Maybe the cache has to be reloaded. |
Probably; that happened to me as well, but after a reload with F12+disable cache it looked fine. |
Merged in 88cb856. |
I'm creating this PR myself for ease of tracking olibu's branch as quoted in #81.