You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
* TODO(ErinCoughlan): Add the following config options.
* - `groupName` - `{string=}`: Name of panel groups. This group name is
* used for configuring the number of open panels and identifying specific
* behaviors for groups. For instance, all tooltips will be identified
* using the same groupName.
Keep track of what panels are opened for a particular group (in order).
Implement/Extend the following methods:
/**
* @ngdoc method
* @name $mdPanel#setGroupMaxOpen
* @description
* Sets the maximum number of panels in a group that can be opened at a given
* time.
*
* @param groupName {string} The name of the group to configure.
* @param maxOpen {number} The max number of panels that can be opened.
*/
setGroupMaxOpen is a global configuration for a specific group. When this max is reached, the panel should close the panel that was first opened, keeping only a specific number of panels open at a time.
An alternative to closing the first panel is to close the panel the user interacted with first. For example, assume there is a max of 2 panels open. The user interacts with panel 1, opens panel 2, goes back to panel 1, then opens panel 3. Panel 2 should close because it was interacted with the farthest back. I can see benefits to either implementation and I think either is understandable from a user's point of view. Perhaps make it configurable.
clickOutsideToClose and pressEscapeToClose should optionally close either all of the panels in a group or only the last panel. Add a config option for specifying which behavior is desired.
Rationale for this Feature
Grouping allows the user to specify logic for a collection of panels. For instance, all popups in the header can be considered one group with a max of one popup open at the same time. Dialogs within dialogs are another example of groups. A "dialog group" may be able to have a max of 3 opened at a time, and then after this point, old dialogs close. This prevents the panel from storing a ridiculous amount of data in memory or polluting the DOM with several panels. This helps performance and gives the user more flexibility about how to use panels.
Reacted by McKenzie Long, Brad Richardson, Nils Heuermann and Ivan Zakharchuk
@ThomasBurleson@crisbeto I have been working closely with @ErinCoughlan on this. So far, I have the grouping functionality built as well as setting the maximum number of open panels on a group. The only thing that I have left is the test writing for the methods that I have created.
With that being said, I will be continuing the building of the grouping functionality to introduce the closeGroup, closeAll, destroyGroup, and destroyAll methods, however, Erin has asked that I only do a PR for the completed grouping and maxOpen methods. We will create another issue and PR set for the rest of the functionality. There really isn't anything left to pair on.
@bradrich Pairing on tests is not a bad idea as it would give @crisbeto the ability to "catch up" on the functionality you added and make suggestions for better tests or additional work. And after the initial grouping PR is done, you could actually split each of the remaining functionality across multiple people if you wanted to.
Activity
ThomasBurleson commentedon Sep 2, 2016
@bradrich - @crisbeto will be pairing with you on this. Please sync with him online.
bradrich commentedon Sep 2, 2016
@ThomasBurleson @crisbeto I have been working closely with @ErinCoughlan on this. So far, I have the grouping functionality built as well as setting the maximum number of open panels on a group. The only thing that I have left is the test writing for the methods that I have created.
With that being said, I will be continuing the building of the grouping functionality to introduce the
closeGroup,closeAll,destroyGroup, anddestroyAllmethods, however, Erin has asked that I only do a PR for the completed grouping and maxOpen methods. We will create another issue and PR set for the rest of the functionality. There really isn't anything left to pair on.ErinCoughlan commentedon Sep 2, 2016
@bradrich Pairing on tests is not a bad idea as it would give @crisbeto the ability to "catch up" on the functionality you added and make suggestions for better tests or additional work. And after the initial grouping PR is done, you could actually split each of the remaining functionality across multiple people if you wanted to.
feat(panel): Panel grouping
feat(panel): Panel grouping
feat(panel): Panel grouping
feat(panel): Panel grouping
9 remaining items
feat(panel): Panel grouping
feat(panel): Panel grouping
feat(panel): Panel grouping
feat(panel): Panel grouping
feat(panel): Panel grouping
feat(panel): Panel grouping
feat(panel): Panel grouping
feat(panel): Panel grouping (#9538)
feat(panel): Panel grouping (angular#9538)