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

154 scheduled notifications allow users be able to add or delete the queries to use in their notification #170

Conversation

jmbrunskill
Copy link
Collaborator

@jmbrunskill jmbrunskill commented Oct 3, 2023

Closes #154

πŸ‘©πŸ»β€πŸ’» What does this PR do?

Gives user a method to see and select sql queries to use in templates.
Any required parameters are added to the params panel to be configured.

Kapture 2023-10-11 at 16 00 23

πŸ§ͺ How has/should this change been tested?

Create SqlRecipientList (with params), Notification Query (with params)
Test different combinations of Scheduled notifications with different parameters, make sure the right combination of parameters shows in the parameter panel.

Check that Coldchain still works...

πŸ’Œ Any notes for the reviewer?

This PR still doesn't do anything with the sql queries, that will be a later PR.

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Bundle size difference

Comparing this PR to main

Old size New size Diff
2.1 MB 2.1 MB 4.86 KB (0.23%)

@jmbrunskill jmbrunskill marked this pull request as ready for review October 11, 2023 03:03
@@ -108,7 +105,6 @@ export const DataTableComponent = <T extends RecordWithId>({
display: 'flex',
flexDirection: 'column',
flex: 1,
height: '100%',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing this seems a bit dangerous, but doesn't seem to have had any ill effects that I've seen so far...

Copy link
Contributor

Choose a reason for hiding this comment

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

πŸ€” I can't see why it was required

@mark-prins mark-prins self-assigned this Oct 16, 2023
Copy link
Contributor

@mark-prins mark-prins left a comment

Choose a reason for hiding this comment

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

πŸŽ‰ Changes are working nicely - and it's all very good to use and the code looks great.

I have a couple of layout suggestions ( popped into a suggestion branch )

Main thing that troubles me is that all the bits are cramped on the form.. which is unrelated to this PR really..

Current

Screenshot 2023-10-17 at 9 27 07β€―AM

Suggested
Screenshot 2023-10-17 at 10 16 19β€―AM

I've also added the end of the breadcrumb - it was showing the ID but I think it's nicer with the title

One other nit pick when using the form.. I had trouble with the validation.
I thought that I had entered all the required fields - there was nothing else indicated in this view:

Screenshot 2023-10-17 at 9 28 21β€―AM

it turned out that the parameters were required - but because they aren't shown I didn't realise πŸ™„

Even opening the panel - they aren't indicated as required..
Then I caused a separate problem by deleting a parameter value, but the validation allows me to save still πŸ€”

Screenshot 2023-10-17 at 9 30 02β€―AM

@@ -108,7 +105,6 @@ export const DataTableComponent = <T extends RecordWithId>({
display: 'flex',
flexDirection: 'column',
flex: 1,
height: '100%',
Copy link
Contributor

Choose a reason for hiding this comment

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

πŸ€” I can't see why it was required

height={modalHeight}
width={modalWidth}
okButton={
<Tooltip title={t('label.select-queries')}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the tooltip add anything? Given that it has the same text, I'm not convinced that it's useful.
If it is - perhaps it should be part of the button component 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.

I think it's a difference between DialogButton and LoadingButton
Kapture 2023-10-25 at 15 12 17

I'll change to dialog button ok variant like this?
image

I don't think it particularly important either way.

@jmbrunskill
Copy link
Collaborator Author

Then I caused a separate problem by deleting a parameter value, but the validation allows me to save still πŸ€”

I think this one is kind of by design, and there is a comment in the code. There's a difference between a parameter with an empty string and an not filling in the field. I'm theorising that an empty string might be a valid option in some cases...
image

@jmbrunskill
Copy link
Collaborator Author

it turned out that the parameters were required - but because they aren't shown I didn't realise πŸ™„

Even opening the panel - they aren't indicated as required..

image

I've put in a error state for missing parameters, doesn't automatically open the parameters tab though if you've closed it.
Interested that you've been running into that issue, is it because you are accidentally closing it, or more because you want to test things out?

I'm tempted to remove the close button as a simple fix, I also assume that only experienced people will be using the system so I think it's ok for now, and can be refined later if we get time. At least they'll get a red highlight now...

@jmbrunskill
Copy link
Collaborator Author

πŸŽ‰ Changes are working nicely - and it's all very good to use and the code looks great.

I have a couple of layout suggestions ( popped into a suggestion branch )

Thanks heaps for the suggestions and the review!

…ble-to-add-or-delete-the-queries-to-use-in-their-notification
@jmbrunskill jmbrunskill merged commit 3e80dbd into main Oct 25, 2023
@jmbrunskill jmbrunskill deleted the 154-scheduled-notifications-allow-users-be-able-to-add-or-delete-the-queries-to-use-in-their-notification branch October 25, 2023 02:36
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.

Scheduled Notifications: Allow users be able to add or delete the queries to use in their notification
2 participants