diff options
author | Kyle D <kdumontnu@gmail.com> | 2023-06-02 11:39:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 23:39:01 +0800 |
commit | 72eedfb91584720da774909d3f078b7d515c9fdd (patch) | |
tree | d7b39a05c9c827b3ee81781fd325aa198844087a /web_src | |
parent | e3897148f9e612e363854d790a1e77807dac8d0d (diff) | |
download | gitea-72eedfb91584720da774909d3f078b7d515c9fdd.tar.gz gitea-72eedfb91584720da774909d3f078b7d515c9fdd.zip |
Show file tree by default (#25052)
Feel free to close this if there isn't interest.
The tree view looks amazing, and all of our users are really enjoying it
(major kudos to developers!), but only IF I tell them it exists!
Essentially, the file tree view as it is effectively undiscoverable.
This PR changes the default state for the tree view to open, which
should significantly help with discoverability.
An alternative could be to reserve more horizontal space, as a typical
accordion panel would look (eg. VS Code), eg.
![image](https://github.com/go-gitea/gitea/assets/12700993/505ea40c-42b1-4111-b306-48e51e8e2130)
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/components/DiffFileTree.vue | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index 734ad80e8b..c4d1c614de 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -89,7 +89,8 @@ export default { } }, mounted() { - this.store.fileTreeIsVisible = localStorage.getItem(LOCAL_STORAGE_KEY) === 'true'; + // Default to true if unset + this.store.fileTreeIsVisible = localStorage.getItem(LOCAL_STORAGE_KEY) !== 'false'; document.querySelector('.diff-toggle-file-tree-button').addEventListener('click', this.toggleVisibility); this.hashChangeListener = () => { |