Commit Graph

2168 Commits

Author SHA1 Message Date
Nikita Galaiko
c01c5aec8c fix colors 2023-07-24 12:16:25 +02:00
Nikita Galaiko
d43b10a8f6 link project: update copy 2023-07-24 12:16:25 +02:00
Mattias Granlund
249c367ff2 Replace top theme bar with Meta+T shortcut 2023-07-24 10:59:51 +01:00
Mattias Granlund
dcce083b02 Align items and adjust sizes in toolbar 2023-07-24 10:40:54 +01:00
Scott Chacon
08c61143b3 improve the base branch chooser to introduce virtual branches a bit and explain the base branch 2023-07-24 11:31:07 +02:00
Kiril Videlov
067f8a0b2f Ensure changes are returned even if file content is absent
The revised code now allows the function parseFileSections to return hunkSections even if there is no file content. This appears to have resolved an issue where the function would return an empty array if the content was missing, hence potentially ignoring changes that have been stored in hunkSections.

Changes include:
- An early return statement has been moved further down in the code in the parseFileSections function.
- Now, even if file content does not exist, hunkSections are returned to the caller, ensuring that the changes are not missed.
2023-07-24 09:48:07 +02:00
Nikita Galaiko
6c9f225221 Refactor code for concurrency and error handling
This code change refactors the functions `git_remote_branches_data` and `get_base_branch_data` for improved concurrency and error handling. It primarily uses the `join_all` method from the Futures crate to effectively manage concurrent tasks.

Summary of changes:
- User avatars are now fetched concurrently rather than sequentially. This will improve performance when dealing with large numbers of authors.
- Introduced error handling when a proxy request for the gravatar image fails. A failure to retrieve the image will now default to the use of the original image url, instead of breaking the function.
- Removed redundant construction and use of a HashMap for managing proxies.
- Streamlined the `get_base_branch_data` function for better readability by eliminating the mutable `proxy_map` and directly calling the proxy in the async block. 
- Optimized the creation of `virtual_branches::BaseBranch` and `virtual_branches::RemoteBranch` instances by directly embedding the changes within the `join_all` function calls, reducing the complexity of the code.
2023-07-24 09:43:37 +02:00
Kiril Videlov
e9bc1f02d7 Refactor to use full name instead of first and last name
Redesigned the user profile page to receive Full Name instead of First and Last name. The user update method was adjusted to handle this change. Inputs in the UI that took the first and last name as separate inputs have also been modified to only accept a single name input.

Here's a summary of what was changed:
- The First Name and Last Name fields were replaced with a Full Name field in the form.
- The functions that submitted or processed first and last name data have been simplified to process full name data.
- The client-side and server-side code handling the user update has also been updated to handle only full name.
- Any relevant variable names were also updated to reflect this change.
- The user object now only checks and assigns the `name` property, instead of `given_name` and `family_name`. 

As a note, this simplifies the form and the process but some user's may find the change limiting if they typically prefer to provide their names separately for their first and last names.
2023-07-24 09:37:59 +02:00
Scott Chacon
38cf33d7c6
Merge pull request #825 from gitbutlerapp/docs-in-integration-branch
add docs link to integration branch
2023-07-24 08:51:33 +02:00
Scott Chacon
890f200b73 we need to be more aggressive about our unapply checkout now. stop depending on the index, people! also format. 2023-07-24 08:46:00 +02:00
Scott Chacon
169e2986fd turns out we need to write this back 2023-07-24 08:33:37 +02:00
Scott Chacon
99dbf834cc make the integration commit tree the index, so our git status works properly 2023-07-24 08:28:48 +02:00
Scott Chacon
3cc168d063 add docs link to integration branch 2023-07-24 08:22:39 +02:00
Mattias Granlund
1b2491d80c Fix small misalignment by expandUpDown 2023-07-23 23:07:21 +01:00
Mattias Granlund
58d9c1f11c Link to project correctly from breadcrumbs. 2023-07-23 23:07:21 +01:00
Mattias Granlund
1009d55b68 Add gravatar to content security policy.
It's weird, I see an error in the console about gravatar not being in the CSP. At the
same time gravatar icons in other components load fine.
2023-07-23 23:07:12 +01:00
Mattias Granlund
dd69c35173 Sort files with conflicts first 2023-07-23 23:02:13 +01:00
Mattias Granlund
8944e42e29 Prevent mamimize by dblclicking in textarea 2023-07-23 22:16:07 +01:00
Mattias Granlund
e8bac6274d Apply styling to bottom panel
- remembers expansion state
- todo: resize
2023-07-23 22:13:54 +01:00
Mattias Granlund
39404ee90a Don't toggle maximised width on dblclick branch name input 2023-07-23 18:18:28 +01:00
Kiril Videlov
71904f8311 cargo-fmt 2023-07-23 16:59:45 +02:00
Kiril Videlov
8d89096af3 Split user name into given and family names
Refactored user name field into two separate fields: "given_name" and "family_name". Added functionality to retrieve, update, and validate these new fields. Also streamlined the code related to updating the user's picture.

Changes include:
- Splitting the single "name" field into "given_name" and "family_name" in the User structure and updating the associated functions.
- Modified the user updating function to handle these two new fields separately.
- Added new variables "newGivenName" and "newFamilyName" that store the user's input for these fields and are used to update the user's profile.
- Removed "userNameInput" variable and "pictureChanged" flag that were used to track changes in the previous implementation.
- Ensured that the new input fields are bound to the correct variables in the form markup.
- Included code to load the user's full name (both "given_name" and "family_name") when the page is loaded.
- Removed name-related code from the "user subscribe" block since this is now handled by the new fields.
2023-07-23 16:59:45 +02:00
Kiril Videlov
b3736329eb clean up some warnings 2023-07-23 14:10:39 +02:00
Kiril Videlov
df74eeca22 Refactor & enhance URL rendering logic for branches
The changes refactor and enhance the logic for rendering URLs of a Git branch within the system. Prior to this, the logic created a url function based on the branch name, and used a nameToBranch function to call it, transforming the name string by replacing non-letter/numeric characters. This led to potential issues. 

- Added an 'upstream' object to 'branches' which is then passed on to further components using it. 
- The URL function now directly uses this 'upstream' object instead of deriving it from the branch name, leading to more consistency with remote branches.
- The nameToBranch function became obsolete and was removed.
- The URL now splits the upstream branch name and uses the last part for the branchName, maintaining the old structure while improving the accuracy.
- A condition was added to make sure the URL is only created if the 'upstream' exists.
2023-07-23 13:29:45 +02:00
Kiril Videlov
90b4eb7b0e fix a misaligned pixel 2023-07-23 13:25:34 +02:00
Kiril Videlov
4f282805da Refactor SVG loading icons and adjust styles
This commit includes several changes that revolve around the SVG icons used as loading indicators. The loading indicators have been reduced in size and the animation and color have been adjusted. New SVG graphics have also been introduced, including a complex icon and a simple icon for different sections of the interface.

Here are some key points:
- The size of the `IconLoading` class has been changed from `h-5` and `w-5` to `h-4` and `w-4`.
- New styling with `fill-purple-600`, `text-light-500`, and `dark:text-dark-500` have been applied to `IconLoading` to better match the project's color scheme.
- A new SVG graphic, using `fill="currentFill"`, has been introduced and replaces the old SVG graphic.
- Some SVG tags have been commented out, presumably for future use or for debugging purposes.
2023-07-23 12:43:07 +02:00
Mattias Granlund
b5930770d9 Scroll base lane together with branches 2023-07-23 10:11:54 +01:00
Scott Chacon
bedc837401
Merge pull request #812 from gitbutlerapp/fix-log-formatting
Update style and accessibility attributes in commit component
2023-07-23 09:01:15 +02:00
Scott Chacon
f59cbe0a19 Update style and accessibility attributes in commit component
Updated several class attribute values within the commit component to better control element aspect ratios. This was achieved by changing the flex classes. The reference to commit.description has also been modified to display only the first 100 characters, earlier it used to display 200 characters. 

Key changes include:
- The use of "shrink-0" versus the previous "w-24" and "w-32" values to prevent those elements from shrinking.
- The reduction of commit description substring length.
- Addition of "rel=noreferrer" to the commit url link for improved security and performance.
2023-07-23 08:59:07 +02:00
Mattias Granlund
52dbf4dc65 Actually fix track bubbles 2023-07-23 00:44:18 +01:00
Mattias Granlund
18c2caaa9b Remvoe unwanted scroll from branch lane / recent commits 2023-07-23 00:44:18 +01:00
Mattias Granlund
ebd676af19 Double click anywhere in lane to expand 2023-07-23 00:44:18 +01:00
Mattias Granlund
fa8a87216f Fix commit lane track bubble widths 2023-07-23 00:44:18 +01:00
Mattias Granlund
bd23d33986 Fix commit card style issue 2023-07-22 22:48:04 +01:00
Mattias Granlund
156997a795 Refactor code for better layout management
In this commit, the layout structure of the code has been refactored. The aim is to create better organization and improve overflow handling. The `UpstreamBranchLane` no longer directly shows under the `target` but is now a child of a new div in `Board`. The removal of a comma at the end of `cloud` indicates a minor syntactic adjustment.

Details:
- Introduced a new div with `flex flex-grow overflow-hidden` classes for better layout management.
- Shifted the `UpstreamBranchLane` component inside the newly introduced div.
- Added `overflow-x-hidden` class in two places to handle the x-axis overflow.
2023-07-22 22:48:04 +01:00
Mattias Granlund
e9d4dc664c Restoring something from previous commit
I was having issues with this line, but did not mean to drop the context.
2023-07-22 22:47:40 +01:00
Kiril Videlov
fac9bff162 ai commit messages 2023-07-22 23:14:49 +02:00
Mattias Granlund
9aedde5ddc Moves the upstream component out of the draggable zone 2023-07-22 21:28:55 +01:00
Mattias Granlund
18a11ef5e2 Recent commits hash now links to github. 2023-07-22 21:21:19 +01:00
Kiril Videlov
888896a4d1 the login(out) component is a bit stupid
It redirects to the account page if user is logged in.

This meant that if a user is logged in they cant go to the project settings, since it instantly redirected them to the account settings
2023-07-22 22:15:31 +02:00
Mattias Granlund
3c957d5eba Fix three problems I encountered while running cargo test 2023-07-22 20:22:34 +01:00
Mattias Granlund
9070d4fc11 rename get_test_deps -> new_test_deps 2023-07-22 20:22:00 +01:00
Mattias Granlund
5989ff4833 Remove unneccessary crate use 2023-07-22 20:22:00 +01:00
Mattias Granlund
163813e66b Make the vbranch test code a bit more dry
I was trying to figure out how we can leverage the rust code for
boostrapping new repos during development. It would be great if
I only needed one command to spawn a repo with an active merge
conflict.

While figuring things out I spotted this opportunity to make the
code a bit more dry.
2023-07-22 20:22:00 +01:00
Kiril Videlov
00ef7d8f6f cleanup a bit 2023-07-22 19:07:11 +02:00
Kiril Videlov
fbe54b844d look mom im a rust programmer
(make the get base_base_branch_data use proxied assets)
2023-07-22 19:07:11 +02:00
Kiril Videlov
4bd00063d0 fix a gap regression 2023-07-22 16:42:26 +02:00
Kiril Videlov
6ba26a1e92 if git config not found, return none instead of error out 2023-07-22 16:30:54 +02:00
Kiril Videlov
c925bf121c generate commit message when not logged in
Generate commit  button state for the case when user not logged in or cloud is not enabled
2023-07-22 15:00:15 +02:00
Kiril Videlov
349f32d023 button style tweak 2023-07-22 14:52:03 +02:00