Skip to content
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

feat: add "empty state" messages #284

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

alexfedosov
Copy link
Contributor

I think neonctl could be a bit more user friendly at least in the beginning.

Before:

Screenshot 2024-10-04 at 09 38 41 Screenshot 2024-10-04 at 09 38 18

After:

Screenshot 2024-10-04 at 09 36 29 Screenshot 2024-10-04 at 09 37 11

@alexfedosov alexfedosov requested review from duskpoet and removed request for duskpoet October 4, 2024 07:42
@alexfedosov alexfedosov force-pushed the alexfedosov/better-texts-for-empty-state branch from b66582b to b794494 Compare October 4, 2024 07:57
Comment on lines 198 to 201

if (!sharedProjects.length && !props.orgId) {
out.text('\nNo projects have been shared with you\n');
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

out.write() and out.text() behave differently, causing a different output order. Perhaps we should come up with a better abstraction for printing text (especially, with formatting options)

Copy link
Member

Choose a reason for hiding this comment

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

I think we just need to update text method to push to same chunks array as write does

Copy link
Member

Choose a reason for hiding this comment

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

Do you want my help with fixing it's behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree!

Do you want my help with fixing it's behavior?

That should be straightforward, let me try first :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@duskpoet I think I figured out a better abstraction for adding optional messages to tables in case data is empty edf5a5c (#284)

What do you think?

@alexfedosov alexfedosov marked this pull request as draft October 4, 2024 08:59
@alexfedosov alexfedosov marked this pull request as ready for review October 4, 2024 15:03
@alexfedosov alexfedosov changed the title feat: use a better message when project list is empty feat: add "empty state" messages Oct 4, 2024
Copy link
Member

@duskpoet duskpoet left a comment

Choose a reason for hiding this comment

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

Yea, good choice!

@@ -263,4 +263,3 @@ created_at: 2019-01-01T00:00:00Z
updated_at: 2019-01-01T00:00:00Z
"
`;

Copy link
Member

Choose a reason for hiding this comment

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

did you manually edit this file? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think linter added that change for me, but I couldn't figure out why

@duskpoet
Copy link
Member

duskpoet commented Oct 4, 2024

It would be nice if you can add at least one test that covers an empty list case

@alexfedosov alexfedosov merged commit c30ab70 into main Oct 7, 2024
6 checks passed
@alexfedosov alexfedosov deleted the alexfedosov/better-texts-for-empty-state branch October 7, 2024 08:49
@alexfedosov alexfedosov mentioned this pull request Oct 7, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 7, 2024
I think `neonctl` could be a bit more user friendly at least in the
beginning.


Before:

<img width="673" alt="Screenshot 2024-10-04 at 09 38 41"
src="https://github.com/user-attachments/assets/8ba24eae-ddcd-4503-b5a1-ea84bc4d490f">
<img width="683" alt="Screenshot 2024-10-04 at 09 38 18"
src="https://github.com/user-attachments/assets/7760693b-13f6-4f0f-bc9d-6f69f86b8a0e">

After:

<img width="604" alt="Screenshot 2024-10-04 at 09 36 29"
src="https://github.com/user-attachments/assets/ec6c0901-c925-467b-8c92-f83d293a49df">
<img width="685" alt="Screenshot 2024-10-04 at 09 37 11"
src="https://github.com/user-attachments/assets/0c02ed2e-dbc1-4a46-9689-828b9ed94797">
duskpoet pushed a commit that referenced this pull request Oct 7, 2024
# [2.0.0](v1.37.0...v2.0.0) (2024-10-07)

### Bug Fixes

* create-app should generate dev/ not dev- branch names ([b916a14](b916a14)), closes [#262](#262)

### chore

* remove deprecated flags related to primary branch ([#283](#283)) ([b4e8b9c](b4e8b9c))

### Features

* add "empty state" messages ([#284](#284)) ([2123de3](2123de3))

### BREAKING CHANGES

* The deprecated set-primary branch command has been
removed, deprecated --allow-list and --ip-primary-only project update
flags have been removed, --primary-only flag from the ip-allow command
has been removed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants