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

fix: empty-override-prompt-text #216

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Conversation

pratikmishra356
Copy link
Collaborator

Problem

In case of empty overrides list , page does not have any prompt text to hint user

Solution

Added prompt text in case of empty page

Environment variable changes

What ENVs need to be added or changed

Pre-deployment activity

Things needed to be done before deploying this change (if any)

Post-deployment activity

Things needed to be done after deploying this change (if any)

API changes

Endpoint Method Request body Response Body
API GET/POST, etc request response

Possible Issues in the future

Describe any possible issues that could occur because of this change

Screenshot 2024-08-28 at 15 51 30

@pratikmishra356 pratikmishra356 requested a review from a team as a code owner August 28, 2024 10:24
@pratikmishra356 pratikmishra356 linked an issue Aug 28, 2024 that may be closed by this pull request
.collect_view()
if ctx_n_overrides.is_empty() {
view! {
<div class="flex font-semibold items-center justify-center">
Copy link
Collaborator

Choose a reason for hiding this comment

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

@pratikmishra356 Can we check if this is required in any other screen?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also can this be vertically centered?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I checked this is not required in other screen,
I think it should not be vertically centre as one had to look down a bit,
since overrides text and create button is on top it is better to be aligned towards top

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can make the text bigger, and then center it. May need an icon as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure checking

if ctx_n_overrides.is_empty() {
view! {
<div class="flex font-semibold items-center justify-center">
"Overrides has not been created yet"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"Overrides has not been created yet"
"Overrides have not been created yet"

Copy link
Collaborator

@Datron Datron left a comment

Choose a reason for hiding this comment

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

Small fixes

@ShubhranshuSanjeev
Copy link
Collaborator

Can you change the commit message?

And we should the change message to Start with creating an override, the text color can be bit grayed out along with it an icon can be added to this.

@pratikmishra356 pratikmishra356 force-pushed the prompt-text-for-empty-override-page branch 2 times, most recently from 2f83136 to 5dfe38f Compare August 29, 2024 12:42
@pratikmishra356 pratikmishra356 force-pushed the prompt-text-for-empty-override-page branch from 5dfe38f to 72ff9f2 Compare August 29, 2024 13:18
@pratikmishra356
Copy link
Collaborator Author

Screenshot 2024-08-29 at 18 49 24

@pratikmishra356 pratikmishra356 force-pushed the prompt-text-for-empty-override-page branch 2 times, most recently from 8f88351 to 94967b6 Compare September 2, 2024 07:43
@pratikmishra356 pratikmishra356 force-pushed the prompt-text-for-empty-override-page branch from 4bfaf59 to a3a5080 Compare September 2, 2024 10:20
}
})
.collect_view()
if ctx_n_overrides.is_empty() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use <Show> component to achieve this.
And the else branch in not needed I guess, move the code out of the else branch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ShubhranshuSanjeev can we take this later? I think this is fine for now.

Copy link
Collaborator

@ShubhranshuSanjeev ShubhranshuSanjeev left a comment

Choose a reason for hiding this comment

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

You can use component to achieve this.
And the else branch in not needed I guess, move the code out of the else branch.

@mahatoankitkumar
Copy link
Collaborator

Should we also get this out in other pages like default_config, dimensions, functions. Instead of showing empty tables?

@pratikmishra356
Copy link
Collaborator Author

@mahatoankitkumar other pages have different structure (tabular) so it is not needed there i guess

@sauraww sauraww merged commit 1adf631 into main Sep 2, 2024
4 checks passed
@sauraww sauraww deleted the prompt-text-for-empty-override-page branch September 2, 2024 10:58
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.

Add Create Override prompt text for empty Overrides Page view
5 participants