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

Adding a custom svg to snackbar #3328

Closed
corganfuzz opened this issue Dec 5, 2018 · 11 comments · Fixed by #3548
Closed

Adding a custom svg to snackbar #3328

corganfuzz opened this issue Dec 5, 2018 · 11 comments · Fixed by #3548
Assignees
Labels
🛠️ status: in-development Issues and PRs with active development on them snackbar 🧰 feature-request

Comments

@corganfuzz
Copy link

is it possible to add custom SVG icons within the IgxSnackBar ? like next to the message prop

@kdinev
Copy link
Member

kdinev commented Dec 6, 2018

@corganfuzz We haven't exposed such an option, because the material guideline for snackbars says that icons shouldn't be placed in the snackbar:

https://material.io/design/components/snackbars.html#anatomy

That's why we've exposed only the message and the action buttons as string inputs.

@corganfuzz
Copy link
Author

Certainly, however there has been a couple of cases where material-ui snackbar is used in several apps where you will wanna put 3 loading dots (...) to give the appearance that something is actually loading.
which sometimes is the point of a snackbar

I'm trying to style the snackbar with and ID to achieve that, but that just modifies the whole snackbar and no text inside, either that or a moving gif or icon will do.

In angular material you can put the pizza emoji on. , altough thats not very helpful in my case
ng-pizza

@SlavUI
Copy link
Contributor

SlavUI commented Dec 10, 2018

@StefanIvanov what do you think ?

@kdinev
Copy link
Member

kdinev commented Dec 10, 2018

@corganfuzz I see your point. I think that we can make the message be ng-content inside the snackbar, rather than an input, which will allow you to display some kind of progress inside.

If you're currently using the snackbar as an indeterminate progress indication (loading indicator), then you should know that we have already started working on a component that is for that purpose. It would appear in the next major release, most probably. Would you like us to keep you posted about on the progress?

@StefanIvanov
Copy link
Contributor

First, I would like to ask @corganfuzz if they have considered using the igxBanner, which was recently released. It supports an icon as you can see in #2672 and overcomes the by-design limitation of the Snack Bar which we have followed in order to comply with the Material Guidelines.

@kdinev's has a good point regarding the ng-content but if we were to take that path we would delegate developers the responsibility to comply with the Material Guidelines, which may not be always desirable.

@corganfuzz
Copy link
Author

@StefanIvanov so according to the description a banner is more like a dialog, right?. I have not seen a working example yet. In this case, I need to use a snackbar because it adapts better to a single component rather than the whole page (which is the case of a dialog) I know it could be customized for it, but I feel the snackbar suits it better, just need those 3 loading dots or an icon.

@kdinev
Copy link
Member

kdinev commented Dec 11, 2018

@corganfuzz The banner is very similar to a snackbar, with the difference being that it goes on top of the app, below a nav bar, if there's such, and can have more content than a snackbar. Our banner component made it into 7.0.2, but we still haven't published the docs and samples for it. They will appear live some time this week.

https://material.io/design/components/banners.html

@StefanIvanov
Copy link
Contributor

@corganfuzz the banner appears on the same level as the content it details, which is visually different than a snackbar and a dialog that appear on top of it. Moreover, it usually details or summarizes in a way a collection of items / elements, so if such a collection is the Angular component you are talking about. I have one more question though, do you have some actions within your SnackBar. What does your app user do upon seeing the information in the SnackBar or at least what they are expected to be doing?

@corganfuzz
Copy link
Author

@StefanIvanov the user waits for the data on the grid to load. In our particular scenario, our server goes down all the time ( mostly the weekends) so if data is not present either a pending state or a 500 error, the snackbar gets replaced by red snackbar with a close button on it indicating the server is down.

@kdinev
Copy link
Member

kdinev commented Dec 11, 2018

@corganfuzz We will introduce ng-content inside the snackbar, so you can put a loading indicator next to your message. We will retain the message input for backwards compatibility.

@StefanIvanov
Copy link
Contributor

Moreover, we have updated the specs of our circular and linear progress bars to contain the stories for indeterminate mode and are currently working on providing these as new features to the aforementioned components. This would be a proper indication for lengthy operations like the experience you outlined.

mtsvyatkova added a commit that referenced this issue Jan 8, 2019
mtsvyatkova added a commit that referenced this issue Jan 10, 2019
mtsvyatkova added a commit that referenced this issue Jan 10, 2019
mtsvyatkova added a commit that referenced this issue Jan 11, 2019
mtsvyatkova added a commit that referenced this issue Jan 11, 2019
gedinakova pushed a commit that referenced this issue Jan 11, 2019
* test(snackbar): add tests for ng-content #3328

* chore(snackbar): blank spaces update #3328

* feat(snackbar): add ng-content #3328

* docs(snackbar): update README #3328

* test(snackbar): update test for ng-content #3328

* feat(snackbar): update ng-content logic and README #3328

* test(snackbar): update tests #3328

* feat(snackbar): update the snackbar template #3328

* test(snackbar): change tests #3328

* feat(snackbar): update template #3328

* chore(snackbar): remove f from a test #3328
gedinakova pushed a commit that referenced this issue Jan 30, 2019
* refactor(*): refactor some comments and exports

hide GroupedRecords class from typedoc API doc and refactor
igx-drop-down-theme param comment

Closes #3483 #3484

* test(grid): #3047 igxGrid isn't displayed properly in IE11 when in igxTabs

* chore(*): Fixing lint errors

* fix(grid): igxGrid isn't displayed properly in IE11 in igxTabs #3047

* Include grid's unpinnedWidth and totalWidth in cell width calculation (#3465)

* test(grid): add test for summary alignment #3462

* fix(grid): include grid widths in cell width calculation #3462

* fix(summary): convert getCellWidth from getter to method #3462

* Derive possible heights after markForCheck() is called #3467 (#3479)

* fix(grid): add pipeTrigger in the AfterViewInit event #3467

* test(grid): add general test for treegrid default rendering #8347

* fix(grid): calling pipeTrigger is not needed #3467

* test(grid): move general test to component test file #3467

* test(grid): remove f from test file #3467

*  docs(*): updating changelog for 7.1.x #3495

* chore(*): adding sections for 6.2.4 and 7.0.5 as well

* test(update): Modify firstMonth selector #3508

* Fix - Convert % column width to px when calculating default column width (#3319)

* test(grid): add test for a column width in % #1245

* fix(grid): convert % to px when calculating default width #1245

* test(grid): remove fit #1245

* feat(igx-grid): Add locale property to igx-grid, #3455

* fix(#3332): Exception when exporting more than 8 nested levels (#3501)

* fix(#3332): Exception when exporting more than 8 level

* fix(Exporter): #3332 Adding a test.

* fix(Exporter): #3332 Improve the fix and test

* fix(Exporter): #3332 Fix was braking the existing export

* fix(headers-api-docs): set header IG main page link depending on the lang

Closes #3516

* fix(*): build errors due to displayDensity changes #3310

* chore(*): more code optimizations #3310

* test(snackbar): add tests for ng-content #3328

* chore(snackbar): blank spaces update #3328

* feat(snackbar): add ng-content #3328

* docs(snackbar): update README #3328

* igxTimePicker - editable masked input + dropdown new mode (#3394)

* feat(time-picker): initial implementation of removing dialog #2337

* feat(time picker): spin on edit functionality #2337

* feat(time picker): editable input implementation #2337

* feat(time-picker): dropdown/dialog display rework #2337

* feat(time-picker): sync dropdwwon navigation and input display #2337

* feat(time picker): emit events when necessary #2337

* feat(time picker): code restructuring and demo rework #2337

* feat(time picker): fix broken sample #2337

* feat(time picker): fix test failures and styles #2337

* feat(time-picker): minor fixes and improvements #2337

* feat(time-picker): more fixes and improvements #2337

* feat(time-picker): cover corner cases with invalid value #2337

* refactor(theme): adjust time picker theme

* feat(time picker): hide/show overlay via hidden attribute #2337

* test(timePicker): Adding TimePicker DropDown initial Tests. #2337

* test(timePicker): Adding TimePicker DropDown Tests. #2337

* feat(time-picker): mask directive placeholder #2337

* test(timePicker): Fixing falling Vertical test. #2337

* feat(time picker): some code refactoring #2337

* feat(time picker): code refactoring and bug fixing #2337

* test(timePicker): Finalizing TimePicker DropDown Tests. #2337

* feat(time picker): tests refactoring and bug fixing #2337

* feat(time picker): code styling #2337

* feat(time picker): update README.md and CHANGELOG.md #2337

* feat(time picker): minor fixes/improvements #2337

* feat(time picker): some more little refinements #2337

* chore(*): mask demo enhancement #2337

* chore(*): address review comments #2337

* chore(*): more refinements #2337

* feat(time picker): address comments form review #2337

* feat(time picker): expose enum again in common #2337

* feat(time picker): cover some more corner cases #2337

* feat(time picker): some more minor bug fixes #2337

* feat(time picker): fix undesired input event firing in IE #2337

* fix(IgxColumnMovingDropDirective): focus last active cell on column moving #3407 (#3524)

* chore(*): Added Math ceil in order to get the correct endIndex.

* chore(igx-grid): Fix typo and make little refactoring, #3455

* fix(igx-grid): Add function to localize summaries, #3533 (#3534)

* chore(*): Fix 7.1.1 duplicate section in Changelog

* fix(time picker): cursor flickering in IE #2337

* style(tabs):

1. Remove the wrong calculation for colors
2. Remove ellipsis for long text without icon

* chore(*): Update changelog

* refactor(ripple): Use AnimationBuilder for the animation

* test(igx-tabs): Increase thick time of two tests, #3269

* refactor(*): Fix tests using the ripple module

* test(igx-tabs): Adjust some of the tests, #3269

* fix(time picker): address comments from review #2337

* feat(time picker): clean up imports #2337

* test(snackbar): update test for ng-content #3328

* feat(snackbar): update ng-content logic and README #3328

* fix(time picker): remove renderer #2337

* Rewrite deprecation decorators (#3447)

* chore(*): Remove DeprecateClass util method (#2915)

* chore(datepicker): Replace deprecated selector (#2915)

* chore(*): Rewrite deprecation decorator for properties and methods (#2915)

* chore(*): Fix lint warnings (#2915)

* chore(*): Invoke original getter/setter (#2915)

Invoke original getter/setter for deprecated properties.

* feat(*): Improve property deprecation messages (#2915)

* chore(*): Fix lint errors (#2915)

* chore(datepicker): Revert - Replace deprecated selector (#2915)

This reverts commit a2e731b.

* chore(datepicker): Restore removed selector (#2915)

* chore(datepicker): Show deprecation message when necessary (#2915)

* chore(datepicker): Replace deprecated selector (#2915)

* docs(drop-down): fixing a wrong link #3531

* fix(igx-grid): Add flag for keydown for a corner case in IE, #3504

* chore(igx-grid): Remove 'f', #3504

* feat(search): fix highlight of tree cells #3519

* test(igxInput): #3550 Test setting req input value updates valid state.

* fix(igxInput): #3550 Setting required input value updates valid state.

* fix(Input): #3550 Abstracted the validity check to a method.

* test(snackbar): update tests #3328

* feat(snackbar): update the snackbar template #3328

* feat(igx-grid): Expose column templates as inputs

Closes #3562

* fix(Grid):  fix and tests for #3513. Adding new prop from which to read actual px width for grid cols and using it in igxForOf calculations.

* fix(Grid):  fix  for #3513 - add check in case getPossibleColumnWidth is called before AfterViewInit.

* fix(Grid): Fix and test for scenario when row selectors are enabled with % widths.

* refactor(*): Address review comments

* fix(igx-date-picker): Call markForCheck in writeValue method, #3362

* chore(*): Fixing issues after merge.

* fix(*): Make default locale to be 'en', #3569 (#3573)

* chore(typedoc): fixing comment structure #3523

* test(snackbar): change tests #3328

* feat(snackbar): update template #3328

* chore(snackbar): remove f from a test #3328

* chore(*): shortening statement #3513

* Mvenkov/dropdown scroll fix (#3546)

* fix(igxOverlay): restore correctly element original style, #3527

* chore(igxOverlay): onPosition added, WIP

* fix(igxOverlay): set element scrollTop is setTimeOut, #3527

Setting the scrollTop forces the dropdown's element to flicker. When we set it
just one ms latter animation has time to start and we prevent flickering.

* chore(igxOverla): remove bug fix leftovers

* chore(igxOverlay): use time out only for IE

* fix(igxOverlay): fix elastic pos. + absolute scroll, #3527

* feat(search): fixing tree grid search highlight #3519

* test(navbar): add test for vertically-centered actionIcon content #3584

* chore(navbar): fix lint errors #3584

* fix(navbar): vertically align igx-action-icon content #3584

* fix(filtering): prevent improper event firing in IE for JP #3577

* Fix empty space in treeGrid after expand/collapse (#3554)

* test(tree-grid): add test for issue #3409

* fix(grid): call recalcUpdateSizes in requestAnimationFrame #3409

* fix(grid): add a row only when less than maxItemSize #3409

* fix(Input): #3550 Fixed a bad validation check.

* fix(List): #3602 Show loading template when isLoading=true.

* test(tabs): Fixed tabs test to avoid flickering #3541

* fix(filtering): chip creation while typing in JP on Edge #3599

* feat(search): refactor search and highlight #3519

* feat(build): PreDeploy script cleaning sass and typescript folders #3618

* refactor(*): Fixing tests using the ripple module

* feat(search): fix some grid search issues #3519

* refactor(*): rewrite the senseless logic #3599

* fix(grid): igxGrid isn't displayed properly in IE11 if in igxTabs #3047

* feat(build): Moving PreDeploy.ps1 inside extras folder #3618

* chore(*): Fixing incorrect merge

* refactor(*): combine clauses to avoid code duplication #3599

* feat(search): fix the resolving of filteredSortedData #3519

* feat(search): fix setting the contentChildElement #3519

* test(search): fixing search tests #3637

* fix(search): fix converting nodeLists to array #3637

* fix(search): observe highlight when changing inEditMode #3637

* fix(search): renaming private member #3637

* feat(search): add grid search sample #3519

* test(treeGrid): create tree-grid-search.spec.ts file #3519

* test(treeGrid): add search helper methods #3519

* test(treeGrid): add initial tests #3519

* test(treeGrid): remove 'f' from describe #3519

* test(treeGrid): update hierarchical test #3519

* test(search): add pk/fk test #3519

* test(search): add a pk/fk root/child rows test #3519

* test(treeGrid): add filter and sort search tests #3519

* feat(search): fix treeGrid scrollTo method #3519

* test(treeGrid): add pinning and hiding search tests #3519

* test(search): add scrollable search tests #3519

* test(search): make beforeEach async #3519

* test(treeGrid): remove unused imports #3519

* docs(treeGrid): remove summaries,search & export from limitations #3519

* test(search): add case sensitive/exact match test #3519

* chore(*): fixing some merge errors #3519

* docs(treeGrid): add treeGrid search api to changelog #3519

* feat(search): rename IActiveHighlightInfo members #3519

* docs(search): add changelog breaking change #3519

* feat(search): add back some IActiveHighlightInfo properties #3519

* docs(search): update the changelog #3519

* docs(search): fix formatting in changelog #3519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ status: in-development Issues and PRs with active development on them snackbar 🧰 feature-request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants