Commit Graph

877 Commits

Author SHA1 Message Date
Ian Donahue
2c76b6185b Shortcut to commit page
This commit enhances the display of command descriptions in the Command Palette by splitting the descriptions into separate tokens. This provides a more readable and organized presentation of the information. Additionally, a new keyboard shortcut has been added for easy navigation to the commit page of a project.

Changes:
- Split command descriptions into separate tokens in CmdK.svelte
- Add 'Shift+c' keyboard shortcut for accessing the commit page of a project in CommandPalette.svelte
2023-03-28 07:54:19 +02:00
Ian Donahue
8c4adf4d6b Add scrollbar hiding and improve command palette styling
This commit hides the scrollbar for better UI and updates the command palette styling including the addition of the "Quick commit" command. The diff also includes various improvements to the layout, class names, and keyboard navigability for a better user experience.

Changes:
- Add '.scrollbar-hidden::-webkit-scrollbar' CSS definition to hide scrollbar
- Update and refactor CSS classes for command palette, e.g., '.quick-command-item' and '.quick-command-key'
- Add new "Quick commit" command entry along with its action
- Reorganize commandGroups in 'CmdK.svelte' for more logical ordering
- Replace hard-coded heights with 'max-h' class to better handle different screen sizes
2023-03-28 07:54:19 +02:00
Ian Donahue
d461d670d7 Update commit icon in CommandPalette
This commit updates the icon used for the commit action within the CommandPalette component. Previously, it used the RewindIcon which seemed inappropriate for the action. The GitCommitIcon has been added to the icons index and used as a replacement. Additionally, an unnecessary class attribute was removed from the RewindIcon component.

Changes:
- Add GitCommitIcon to icons index
- Replace RewindIcon with GitCommitIcon in CommandPalette
- Remove unnecessary class attribute from RewindIcon
2023-03-28 07:54:19 +02:00
Kiril Videlov
26440211ab fix things 2023-03-28 07:54:19 +02:00
Ian Donahue
0e16fcbe5e I broke everything!
Trying to add a rewind icon but I broke everything
2023-03-28 07:54:19 +02:00
Ian Donahue
d3f15431c5 Add scrollbar styling and command palette UI
This commit introduces a custom scrollbar styling and updates the Command Palette UI by adding the necessary CSS classes and styling rules. 

Changes include:
- Added custom scrollbar styling with width, track, handle, and hover properties.
- Introduced a "scrollbar-hidden" class for hiding the scrollbar.
- Updated Command Palette classes such as "result-section-header", "quick-command-item", and "quick-command-key" to improve the overall UI experience.
2023-03-27 20:48:03 +02:00
Kiril Videlov
c5d124a98e format 2023-03-27 17:31:27 +02:00
Kiril Videlov
d8b044cf3b add storybook again 2023-03-27 17:31:27 +02:00
Kiril Videlov
14ced0d544 Revert "add Storybook dev dependency"
This reverts commit 615f0092a6.
2023-03-27 17:25:19 +02:00
Nikita Galaiko
3653ae6a31 cache date on the client 2023-03-27 17:16:06 +02:00
Kiril Videlov
615f0092a6 add Storybook dev dependency 2023-03-27 17:09:32 +02:00
Nikita Galaiko
d8af16f0cf better file filter 2023-03-27 16:38:32 +02:00
Nikita Galaiko
2057c9216e fix url encoding 2023-03-27 16:38:32 +02:00
Nikita Galaiko
3cec588eef fix layout 2023-03-27 16:38:32 +02:00
Nikita Galaiko
a35d875aa1 dynamic file filter 2023-03-27 16:38:32 +02:00
Nikita Galaiko
e955f4a786 format 2023-03-27 16:38:32 +02:00
Nikita Galaiko
8cadaed8a0 link file 2023-03-27 16:38:32 +02:00
Nikita Galaiko
b9363aed1f add file filter back 2023-03-27 16:38:32 +02:00
Nikita Galaiko
b19e1ebb76 link player from search 2023-03-27 16:38:32 +02:00
Nikita Galaiko
c45819cc6b flip sessions 2023-03-27 16:38:32 +02:00
Nikita Galaiko
5aabfac420 scroll sessions list 2023-03-27 16:38:32 +02:00
Nikita Galaiko
b1d881247c scroll code viewer 2023-03-27 16:38:32 +02:00
Nikita Galaiko
fa58493f49 make player linkable 2023-03-27 16:38:32 +02:00
Ian Donahue
9410eafd92
Merge pull request #48 from gitbutlerapp/ian/gb-112-spacing-in-search-results
Ian/gb 112 spacing in search results
2023-03-24 16:05:17 +01:00
Nikita Galaiko
34cfd571d6 player: use session to calculate duration 2023-03-24 16:00:09 +01:00
Nikita Galaiko
f146e9d33d player: drop editsCount 2023-03-24 16:00:09 +01:00
Nikita Galaiko
06301d2853 player store date in the same way 2023-03-24 16:00:09 +01:00
Nikita Galaiko
1e9a187e4b player: auto-update file filter 2023-03-24 16:00:09 +01:00
Nikita Galaiko
638028b119 player: store delta index in url 2023-03-24 16:00:09 +01:00
Nikita Galaiko
74eb6ae450 fix some linter issues 2023-03-24 14:47:20 +01:00
Nikita Galaiko
73d1a44671 pnpm format 2023-03-24 14:47:20 +01:00
Nikita Galaiko
7d846fccbc player: simplify activities layout 2023-03-24 14:47:20 +01:00
Nikita Galaiko
6ff78b8cf7 player: fix linter 2023-03-24 14:47:20 +01:00
Nikita Galaiko
fa8f95f705 player: refactor day selector css/js 2023-03-24 14:47:20 +01:00
Nikita Galaiko
5b55f10d8f player: make url search params reactive 2023-03-24 14:47:20 +01:00
Nikita Galaiko
2da6febd2c 🚀 hardware accelerate webkit 2023-03-24 12:25:06 +01:00
Nikita Galaiko
e77cc0c616 Refactor CodeViewer to use table layout
Refactored the CodeViewer component to switch from using grid layout to a table layout for improved rendering performance. This change simplifies CSS styles by removing unnecessary definitions and ensures consistency in line number display. Additional styling has been applied to the table layout to maintain the existing look and functionality.

- Replaced the `div` structure with `table`, `tbody`, and `tr` elements
- Renamed `rows` to `renderedRows` for better naming consistency
- Added `originalLineNumberDigits` and `currentLineNumberDigits` for proper alignment in table cells
- Removed unnecessary CSS rules and added table-specific styles
2023-03-24 12:12:48 +01:00
Kiril Videlov
1ba0ae0fe7 refactor reusable modal component 2023-03-24 12:06:59 +01:00
Ian Donahue
5a218c8ce5 Refactor search results UI and navigation
This commit refactors the search results page UI and updates the navigation buttons for better user experience. Previously, the search result list layout and the navigation buttons showed inconsistent styling and padding issues.

Changes include:
- Adjusting padding and margin for search result list and search result items.
- Moving the navigation buttons inside the search result list.
- Updating the styling and hover effect for navigation buttons.
- Removing unnecessary padding and margin for figure elements.
2023-03-24 11:19:46 +01:00
Ian Donahue
b875f3bc58 Added 1 Title to the current branch
This will allow people to see full names o fa branch.
2023-03-24 10:44:26 +01:00
Ian Donahue
132b2b1ee5 Merge branch 'master' into ian/gb-112-spacing-in-search-results 2023-03-24 10:38:49 +01:00
Nikita Galaiko
6d692f43be apply custom hyighlight only for if needed 2023-03-24 09:01:50 +01:00
Nikita Galaiko
1ac0e9a0d4 Improve search result layout and spacing
Adjusted the search result layout and added more consistent spacing in the search results page. This makes the display cleaner and easier to read for users. 

Changes:
- Changed list styling for flex display and added a `-mr-14` class to control the layout.
- Updated spacing between elements using both `flex-col gap-6` and `mr-14` to provide more consistent separation between items.
2023-03-24 08:53:49 +01:00
Nikita Galaiko
4cc61cd8d4 Add pagination and improve search UI
This commit adds pagination support to the search results page by updating the limit of results per page, implementing openNextPage and openPrevPage functions, and including navigation buttons for the pagination. It also improves the UI by adding a spinning icon while searching for results and adjusts the overall styling for better readability.

- Added IconChevronLeft and IconChevronRight to icons exports
- Updated the limit of results per page from 50 to 10
- Implemented openNextPage and openPrevPage functions for pagination
- Added navigation buttons for previous and next pages
- Used IconRotateClockwise with animation for a spinning icon while searching
- Updated the styling for better UI readability
2023-03-24 08:53:49 +01:00
Ian Donahue
3a372284e8 Scroll for search results are now on the right of screen
This commit includes refactoring the code format to use consistent indentation, and updates the CSS classes to improve UI element styling. The changes were made in the src/lib/search.ts file and the src/routes/projects/[projectId]/search/+page.svelte file.

- Adjusted the indentation in src/lib/search.ts to use tabs consistently
- Changed the figure class from "mx-14 flex h-full flex-col gap-2" to "search-results flex h-full flex-col gap-2" in +page.svelte
- Updated the figcaption and ul elements to have consistent margins and padding in +page.svelte
2023-03-24 07:42:44 +01:00
Ian Donahue
b10518b14f Scroll for search results are now on the right of screen
This commit includes refactoring the code format to use consistent indentation, and updates the CSS classes to improve UI element styling. The changes were made in the src/lib/search.ts file and the src/routes/projects/[projectId]/search/+page.svelte file.

- Adjusted the indentation in src/lib/search.ts to use tabs consistently
- Changed the figure class from "mx-14 flex h-full flex-col gap-2" to "search-results flex h-full flex-col gap-2" in +page.svelte
- Updated the figcaption and ul elements to have consistent margins and padding in +page.svelte
2023-03-23 16:22:43 +01:00
Kiril Videlov
39e0c1a8ff
Merge pull request #44 from gitbutlerapp/asdf2
asdf2
2023-03-23 16:13:00 +01:00
Nikita Galaiko
a686f64c7a Add pagination support to project search
This commit adds support for pagination within the project search feature. The changes include adding a limit of 50 results per page and an offset to handle page offsets in the search. Additionally, the search results are now updated to include a 'haveMore' flag to indicate if there are more results to display.

Changes in detail:
- Added limit and offset variables
- Updated search result to include 'haveMore' flag
- Modified fetchResultData function to handle updated search results
2023-03-23 16:11:39 +01:00
Nikita Galaiko
b7e5e2a0c8 Refactor search results with asyncDerived store
This commit refactors the search results code to use the asyncDerived store for fetching and displaying results. This simplifies and improves the overall code structure by streamlining the state management and lifecycle of search-related data. Additionally, it switches to using derived stores for displaying results and states related to searching, showing loading, error, and result states as needed.

Changes:
- Remove the manual search fetching and state management code.
- Utilize asyncDerived and derived stores to handle fetching and displaying search results.
- Update use of loading, error, and result states to check the $searchState store instead of manually managing those states.
2023-03-23 16:11:39 +01:00
Nikita Galaiko
a0eeeae645 Refactor search functionality in project layout
This commit refactors the search functionality present in the project layout. Instead of using a debounced input event handler to update the search query, a form is now used to handle search submission. The search functionality in the search page has also been updated to use the query param instead of a writable store, and the fetchResultData function has been extracted for better readability.

Changes:
- Replace debounced input event handler with form submission in project layout
- Update search functionality in search page to use query param
- Extract fetchResultData function for better readability
- Remove unnecessary context and store usage
2023-03-23 16:11:39 +01:00