-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Improve UX when creating new items #4089
Open
seancolsen
wants to merge
12
commits into
develop
Choose a base branch
from
view_new_items
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+592
−144
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zackkrida
added
the
pr-status: revision
A PR awaiting follow-up work from its author after review
label
Dec 17, 2024
Prevent the highlight from displaying above dropdowns opened after the highlight is added. Display highlights, dropdowns, and modals in the order they are added to the DOM.
seancolsen
added
pr-status: review
A PR awaiting review
and removed
pr-status: revision
A PR awaiting follow-up work from its author after review
labels
Dec 19, 2024
@ghislaineguerin you might be interested in looking over the UX here as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
Prompts users to name tables during creation
Fixes #2490
Makes behavior consistent after creating most things
Fixes #4055
The pattern is now to remain on the view of all the things — not to "open" the new thing you just created.
The one exception is Users because the workflow and UX would require more changes there.
Adds a new low-level
highlightNewItems
svelte actionThis is the real meat of the PR!
See the demo video below to understand how it works.
There were lots of tricky challenges in building this, and I'm pretty happy with how it turned out. I ended up using
IntersectionObserver
,ResizeObserver
,MutationObserver
,requestAnimationFrame
, and@starting-style
. Phew!I'll note that
@starting-style
is still not widely supported, but I think that's okay here. Users with older browsers won't see the highlight or the hint, but these are not crucial features. They can still use Mathesar without them. And at this point all major browsers have recent versions with sufficient support, so it's only a matter of time before necessary support is wide.Highlights newly-added things
Fixes #4054
This PR highlights newly-added:
It does not highlight newly-added:
❌ Users
We have a page-based workflow for adding and editing users. We'd need larger changes in order to bring this workflow into consistency with the rest of the app, and I didn't want to take that, both for the sake of implementation scope, and for the sake of minimizing design changes/discussions.
❌ Roles, Collaborators
I want to get Comprehensive documentation improvements #4031 merged before messing with that UI again.
Also Implementation will require some additional complexity within
new-item-highlighter
in order to handle a row that contains multiple top-level elements being added together.❌ Rows, Columns — because implementation would be tricky
❌ Filter, Sort, Group, Record summary template fields, exploration transformations
I don't think highlighting is necessary here because the newly-added items appear right next to the button to add the thing, so it's pretty clear to the user which one was just added.
❌ Links, Constraints
I skipped these for the sake of time because they seem lower-priority
Demo
2024-12-19_11-16-45.mp4
Checklist
Update index.md
).develop
branch of the repositoryDeveloper Certificate of Origin
Developer Certificate of Origin