Skip to content

UI: Unify uncommitted changes tab into objects #9181

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

Merged
merged 9 commits into from
Jun 16, 2025
Merged

Conversation

ozkatz
Copy link
Collaborator

@ozkatz ozkatz commented Jun 13, 2025

This is part of @itaigilo's vision which I agree with :) some tabs in the lakeFS UI are redundant. This is step #1 - show changes when exploring a branch in the same view, a dedicated tab for it is not required and increases cognitive load.

Before:

Upload in object screen:
Screenshot 2025-06-13 at 12 07 21

See the diff (and commit it) in "uncommitted changes":

Screenshot 2025-06-13 at 12 07 11

After:

Screenshot 2025-06-13 at 14 39 55

Commit directly from objects page:

Screenshot 2025-06-13 at 14 38 19

@ozkatz ozkatz requested a review from itaigilo June 13, 2025 16:12
@ozkatz ozkatz self-assigned this Jun 13, 2025
@ozkatz ozkatz added area/UI Improvements or additions to UI include-changelog PR description should be included in next release changelog minor-change Used for PRs that don't require issue attached labels Jun 13, 2025
@nopcoder
Copy link
Contributor

like we had long time ago ;)
from ux I think it will be better to extract the toggle outside the drop down and actions as buttons.

@itaigilo
Copy link
Contributor

Great initiative 😄

On the product side (havne't looked at the code yet):

  1. When clicking Uncommitted changes it shows only the uncommitted changes of this branch?
  2. When there are no such UC, this button won't appear, I assume?
  3. Agree with @nopcoder here - the buttons should be a separate part. Maybe visible only when the UC button is clicked?

@ozkatz
Copy link
Collaborator Author

ozkatz commented Jun 14, 2025

Great initiative 😄

On the product side (havne't looked at the code yet):

  1. When clicking Uncommitted changes it shows only the uncommitted changes of this branch?

indeed.

  1. When there are no such UC, this button won't appear, I assume?

correct! it appears if theres one or more uncommitted change on the branch

  1. Agree with @nopcoder here - the buttons should be a separate part. Maybe visible only when the UC button is clicked?

Fixed that! clicking the uncommitted changes button toggles between showing only uncommitted changes/everything (default) - the dropdown next to it opens a dropdown with commit and rollback buttons

Copy link
Contributor

@itaigilo itaigilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A great change, I like it a lot.

Some details that needs to be handled -
Mainly around code structure and some nits.

Anyway, I enjoy the result 😄


return (
<Nav variant="tabs" >
<Link active={active === 'objects'} href={withRefContext(`/repositories/${repoId}/objects`)} component={NavItem}>
<DatabaseIcon/> Objects
</Link>
<Link active={active === 'changes'} href={withBranchContext(`/repositories/${repoId}/changes`)} component={NavItem}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@@ -586,7 +586,7 @@ const EntryRow = ({ config, repo, reference, path, entry, onDelete, showActions
return (
<>
<tr className={rowClass}>
{diffIndicator && <td className="diff-indicator">{diffIndicator}</td>}
<td className="diff-indicator">{diffIndicator || ""}</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise, some lines (those that have changes) will have more td's than one that don't

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, missed that 👍

* @param repo Repository
* @param reference commitID / branch
*/
export const EmptyChangesState = ({ repo, reference }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably nit, but -
This is the first func in this file.
I think it should be further down, since it makes it harder for me to understand what's this file is all about.

<h3 className="mb-3">No Changes Yet</h3>
<p className="text-muted mb-4">
No uncommitted changes on <code>{reference.id}</code>!
<br />Upload or modify files to see them appear here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not advised to use
for layout (only for specific line-breaks in a text).
It gives less control on how it looks.

);
};

export async function appendMoreResults(resultsState, prefix, afterUpdated, setAfterUpdated, setResultsState, getMore) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's not you who named it (well, at least not in this PR 😄),
But it's confusing - results of what?
I assume it should be something like appendMoreObjectsListResults?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree - will resist the urge to do it in this PR though :)

}) => {
const [actionError, setActionError] = useState(null);
const [internalRefresh, setInternalRefresh] = useState(true);
const [afterUpdated, setAfterUpdated] = useState("");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's afterUpdated? Why it's initialized to ""?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's used for pagination but terribly named. Renamed it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This became a huge file.
I highly suggest splitting it into smaller components.

}

/* Override action-bar button margins for button groups */
.action-bar .btn-group .btn {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why that's needed? Can't this be done using ml-0 on the object itself?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not :) removed

}

.changes-action-btn {
margin: 0 !important;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, and in tree.css.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed!

@ozkatz ozkatz requested a review from itaigilo June 14, 2025 23:38
Copy link
Contributor

@itaigilo itaigilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks for handling this!

Approved -
Can you please either create an Issue (or a PR 😄) for breaking objects.jsx into smaller components? 🙏

@@ -586,7 +586,7 @@ const EntryRow = ({ config, repo, reference, path, entry, onDelete, showActions
return (
<>
<tr className={rowClass}>
{diffIndicator && <td className="diff-indicator">{diffIndicator}</td>}
<td className="diff-indicator">{diffIndicator || ""}</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, missed that 👍

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as off-topic.

@ozkatz ozkatz merged commit 90c5b15 into master Jun 16, 2025
43 checks passed
@ozkatz ozkatz deleted the feat/uncommitted-bye branch June 16, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/UI Improvements or additions to UI include-changelog PR description should be included in next release changelog minor-change Used for PRs that don't require issue attached
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants