├── .gitignore ├── example01.png ├── chrome_extension_notes.md ├── extension ├── manifest.json └── verticalSheetTabs.js ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.bak 3 | -------------------------------------------------------------------------------- /example01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JimHokanson/vertical_gsheets_selector/HEAD/example01.png -------------------------------------------------------------------------------- /chrome_extension_notes.md: -------------------------------------------------------------------------------- 1 | Chrome extension notes: 2 | 3 | 4 | Content scripts allows you to add scripts: 5 | https://developer.chrome.com/extensions/content_scripts 6 | 7 | 8 | Steps: 9 | 1. Detect working on a sheets page 10 | 2. Call the script code 11 | 3. Inject javascript 12 | 4. Run code ... -------------------------------------------------------------------------------- /extension/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vertical Sheet Tabs", 3 | "version": "1.0", 4 | "description": "Allows sheet navigation with vertical sheet tabs!", 5 | "manifest_version": 3, 6 | "content_scripts": [ 7 | { 8 | "matches": ["https://docs.google.com/spreadsheets/*"], 9 | "run_at": "document_idle", 10 | "js": ["verticalSheetTabs.js"] 11 | } 12 | ] 13 | 14 | } 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Jim Hokanson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vertical GSheets Selector # 2 | 3 | This code is currently a work in progres. You can use it to display a sidebar that displays sheet names. When you click on a sheet it should navigate to that sheet. 4 | 5 | **The software available on this website are provided "as is" without warranty of any kind, either express or implied. Use at your own risk.** 6 | 7 | 8 |  9 | 10 | # Setup # 11 | 12 | 1. Navigate to chrome://extensions/ 13 | 2. Make sure developer mode is enabled (upper right) 14 | 3. Select "load unpacked" (upper left) and choose the code directory labeled "extension" in this repo. 15 | 16 | # Usage # 17 | 18 | 1. Load a Google Spreadsheet 19 | 2. After loading has finished, go to the **"Add-ons"** menu and select **"Launch Vert Tabs"**. A sidebar should pop-up on the right. 20 | 3. Clicking on a sheet name on the right should navigate to the correct sheet. 21 | 22 | # Warning Notes # 23 | 24 | This is my first js project and currently the code needs to be cleaned up and documented. I still have a few features I want to add like listening for sheet deletions, renames, and selections from the main horizontal selector. I don't attempt to manipulate the data in the sheet in anyway, but still, use at your own risk. 25 | 26 | # Feature Status # 27 | 28 | **Mirroring Features** - i.e. tracking what happens from interacting with the horizontal interface 29 | 30 | - update on add sheet - DONE 31 | - update on sheet selection via all sheet selector - NYI 32 | - update on sheet dragging - DONE 33 | - update on sheet left click - DONE 34 | - Update on sheet right click - DONE 35 | - Move Left & Right - DONE 36 | - Hide Sheet - NYI - just needs to respect hidden status as observer captures DOM change but element still exists (presumably class list change) 37 | - Color Support - NYI 38 | - Rename - NYI 39 | - Duplicate - DONE 40 | - Delete - DONE 41 | 42 | **Other Completed Features** 43 | 44 | - resize via dragging side of panel 45 | - resize on hiding menus - sometimes flaky ... 46 | - force rerender - click on the word "sheets" on top to force rerendering 47 | 48 | TODO 49 | 50 | # Improvements # 51 | 52 | - fix resize to be more responsive, base on target width/height, not on being different - use observers ... 53 | - clean up code!!!! 54 | - make force rerender more obvious (add refresh button?) 55 | - drag and drop divs 56 | - on close download window, change height - NYI -------------------------------------------------------------------------------- /extension/verticalSheetTabs.js: -------------------------------------------------------------------------------- 1 | /* 2 | Resize events 3 | -------------- 4 | 1. window resizes 5 | 2. hide menus 6 | 3. hide the side app thing 7 | 8 | Next steps 9 | ---------------------------------- 10 | 1. DONE Handle hiding of the side panel - might require refactoring input to resize 11 | 2. DONE Add listener for bottom sheet select updating sidebar 12 | 3. DONE resize by dragging 13 | - cursor is in place for action - needs callbacks 14 | 4. delete listener 15 | 5. DONE "add sheet" listener 16 | - add sheet puts a sheets to the right of the current sheet 17 | 6. DONE fix menu loading - run delayed check instead of fixed wait 18 | 7. DONE move listeners to parents of vert-sheets 19 | 8. DONE fix clicking - color the whole sheet 20 | 9. DONE add indictor for resizing 21 | 10. try resizing sheet text on dragging instead of showing a temporary line 22 | 11. DONE allow resizing in empty space in sidebar ... 23 | 12. DONE make border of sheets black to avoid strange color when selected 24 | 13. support move sheet detection 25 | - on mouse down fire a listener that looks for mouse up 26 | 14. support detecting sheet selection when clicking on all-sheets 27 | 15. rename listener 28 | 29 | //Scrollbar 30 | //- need to adjust after it has been adjusted already by browser 31 | //- need to consider all resize events AND sheet changes 32 | //- z-index needs to go high otherwise not visible 33 | //- left would need to change to shift over ... 34 |
37 | 38 | //Delete, rename .docs-sheet-tab-menu 39 |