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

#1801 Added close a specific notification feature #1985

Merged

Conversation

AdeshGhadage
Copy link
Contributor

@AdeshGhadage AdeshGhadage commented Oct 9, 2024

This pull request addresses issue #1801

Hello Maintainers,

Could you please review my code? I would appreciate any suggestions or feedback you might have.

@jrobinAV jrobinAV added 🖰 GUI Related to GUI hacktoberfest hacktoberfest issues hacktoberfest - 100💎 Issues rewarded by 100 points 🟨 Priority: Medium Not blocking but should be addressed labels Oct 9, 2024
@AdeshGhadage
Copy link
Contributor Author

@jrobinAV can you review my pr please?

@FlorianJacta
Copy link
Member

I have put @FabienLelaquais and @FredLL-Avaiga as reviewers of this PR.

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

Waiting eagerly for the frontend part of it

taipy/gui/gui.py Outdated Show resolved Hide resolved
taipy/gui/gui.py Outdated Show resolved Hide resolved
taipy/gui/types.py Outdated Show resolved Hide resolved
Copy link
Member

@FabienLelaquais FabienLelaquais left a comment

Choose a reason for hiding this comment

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

Nice

taipy/gui/gui.py Outdated Show resolved Hide resolved
Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

waiting for the frontend :-D

taipy/gui/gui.py Outdated Show resolved Hide resolved
@AdeshGhadage
Copy link
Contributor Author

@quest-bot loot #1801

@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Oct 11, 2024
Copy link

quest-bot bot commented Oct 11, 2024

Quest PR submitted! image Quest PR submitted!

@AdeshGhadage, you are attempting to solve the issue and loot this Quest. Will you be successful?


Questions? Check out the docs.

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

Looks very good, tx @AdeshGhadage

  • a few changes
  • some tests

frontend/taipy-gui/src/context/taipyReducers.ts Outdated Show resolved Hide resolved
taipy/gui/gui.py Show resolved Hide resolved
@FredLL-Avaiga
Copy link
Member

please update your branch

frontend/taipy-gui/src/context/taipyReducers.ts Outdated Show resolved Hide resolved
frontend/taipy-gui/src/context/taipyReducers.ts Outdated Show resolved Hide resolved
frontend/taipy-gui/src/context/taipyReducers.ts Outdated Show resolved Hide resolved
frontend/taipy-gui/src/context/taipyReducers.ts Outdated Show resolved Hide resolved
@FredLL-Avaiga
Copy link
Member

any question ?

@AdeshGhadage
Copy link
Contributor Author

any question ?

is my pr correct? any suggestion or changed i have missed ?

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

A few comments

  • Would be nice to have an example that shows how to get the returned notification_id and delete the notification (/doc/gui/examples)

frontend/taipy-gui/src/components/Taipy/FileSelector.tsx Outdated Show resolved Hide resolved
frontend/taipy-gui/src/components/Taipy/FileSelector.tsx Outdated Show resolved Hide resolved
frontend/taipy-gui/src/components/Taipy/FileSelector.tsx Outdated Show resolved Hide resolved
taipy/gui/gui.py Show resolved Hide resolved
taipy/gui/gui.py Show resolved Hide resolved
taipy/gui/gui.py Outdated Show resolved Hide resolved
taipy/gui/gui.py Show resolved Hide resolved
frontend/taipy-gui/src/context/taipyReducers.ts Outdated Show resolved Hide resolved
@FredLL-Avaiga
Copy link
Member

thanks to makes the resolved discussions as resolved and to update the branch

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

looks almost good
Just needs a few tests

taipy/gui/gui_actions.py Outdated Show resolved Hide resolved
taipy/gui/gui.py Show resolved Hide resolved
Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

Very good
Now we need some tests:

  • backend to check that the ws payload looks OK
  • frontend around the reducer and Alerts (fix the ones that are broken + ?)

taipy/gui/gui_actions.py Show resolved Hide resolved
@FredLL-Avaiga
Copy link
Member

Branch updated

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

an old test is now failing, can you fix it ?
const action = { type: Types.DeleteAlert };
644 | const newState = taipyReducer(initialState, action);
> 645 | expect(newState.alerts).toEqual([
| ^
646 | {
647 | message: "alert2",
648 | atype: "type2",

@FredLL-Avaiga
Copy link
Member

PS: I've updated your branch

@AdeshGhadage
Copy link
Contributor Author

Very good Now we need some tests:

  • backend to check that the ws payload looks OK
  • frontend around the reducer and Alerts (fix the ones that are broken + ?)

why its giving empty array as during test? can help resolve this issue?

@FredLL-Avaiga
Copy link
Member

FredLL-Avaiga commented Oct 22, 2024

Very good Now we need some tests:

  • backend to check that the ws payload looks OK
  • frontend around the reducer and Alerts (fix the ones that are broken + ?)

why its giving empty array as during test? can help resolve this issue?

Because there's no id passed in the deleteAction so every element of the array is filtered out
That's why you need to change that test to provide a valid id to the delete action

@AdeshGhadage
Copy link
Contributor Author

there is some issue with nanoid call i tried to mock the nanoid library by using

jest.mock('nanoid', () => ({
   nanoid: jest.fn(() => 'mockedId'),
}));

but still not worked so i put random string

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

Excellent work
Tx @AdeshGhadage

@FredLL-Avaiga FredLL-Avaiga added the ✅ hacktoberfest: approved An approved PR for Hacktoberfest rewarding label Oct 23, 2024
@FredLL-Avaiga
Copy link
Member

Can you merge this @jrobinAV ?

@jrobinAV jrobinAV merged commit 95dabf5 into Avaiga:develop Oct 23, 2024
50 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI hacktoberfest - 100💎 Issues rewarded by 100 points ✅ hacktoberfest: approved An approved PR for Hacktoberfest rewarding hacktoberfest hacktoberfest issues 🟨 Priority: Medium Not blocking but should be addressed ⚔️ Quest Tracks quest-bot quests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants