Skip to content

[SpeedDial] New component#9539

Closed
mbrookes wants to merge 1 commit into
mui:v1-betafrom
mbrookes:speed-dial
Closed

[SpeedDial] New component#9539
mbrookes wants to merge 1 commit into
mui:v1-betafrom
mbrookes:speed-dial

Conversation

@mbrookes

@mbrookes mbrookes commented Dec 18, 2017

Copy link
Copy Markdown
Member

Closes #2851

Thought I would give this its first public airing for feedback and initial code review.

To do:

  • Complete the keyboard navigation story
  • Tests (in progress)
  • .d.ts

kapture 2017-12-18 at 13 10 41

Comment thread src/styles/zIndex.js Outdated
dialog: 1500,
layer: 2000,
popover: 2100,
speedDial: 2800,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

2500 to be safer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure.

@mbrookes

mbrookes commented Dec 18, 2017

Copy link
Copy Markdown
Member Author

On the keyboard navigation / accesibility question: I'm stuck as to whether up / down should follow the visible layout of the buttons (up to select the next item), or follow the DOM layout:

<FAB>
<First Action>
<Second Action>
<Third Action>

This would behave more like a menu (down is next, up is previous), and might be more natural for a visually impaired user.

Support both!

@oliviertassinari oliviertassinari added the type: new feature Expand the scope of the product to solve a new problem. label Dec 18, 2017

@oliviertassinari oliviertassinari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A first batch of comment.

@@ -0,0 +1,83 @@
// @flow weak

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have removed flow from the demos.

import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import Button from 'material-ui/Button';
import SpeedDialButton from 'material-ui/SpeedDial/SpeedDialButton';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's a good occasion to think of:

import SpeedDial from 'material-ui/SpeedDial';
import SpeedDialButton from 'material-ui/SpeedDialButton';

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure, if that's agreed. (I'm supporting it, but lets give others a chance to have a say).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like the way it's exported below, so it can be imported like:

import SpeedDial, { SpeedDialButton } from 'material-ui/SpeedDial';

This still groups imports by the component they're used with.

import ShareIcon from 'material-ui-icons/Share';
import DeleteIcon from 'material-ui-icons/Delete';

const styles = () => ({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No need for the function, it can be an object.

Comment thread pages/demos/buttons.js Outdated
.readFileSync(require.resolve('docs/src/pages/demos/buttons/FloatingActionButtons'), 'utf8')
`,
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

blank line

import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import classNames from 'classnames';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I try to sort the import by scope. Maybe you would want to do the same and to keep it before the material-ui imports.

Comment thread src/SpeedDial/SpeedDial.js Outdated
width: 56,
textAlign: 'center',
zIndex: theme.zIndex.speedDial,
transition: 'transform 0.1s ease-in-out',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't we use our transition creator (for animation curve consistency)?

Comment thread src/SpeedDial/SpeedDial.js Outdated
transition: 'transform 0.1s ease-in-out',
},
hidden: {
transform: 'scale(0, 0)',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it need to be 2D?

Comment thread src/SpeedDial/SpeedDialButton.js Outdated

return (
<div className={classes.root} {...other}>
<Tooltip title={tooltip} placement="left">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We might want to add a TooltipProps and a ButtonProps property.

Comment thread src/SpeedDial/SpeedDial.js Outdated

const children = React.Children.map(childrenProp, (child, childIndex) => {
if (!React.isValidElement(child)) return null;
const delay = 30 * (open ? childrenProp.length - childIndex : childIndex);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Humm. I would rather be incrementing a counter to account for the null children that can be provided.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Could you explain a bit?

Comment thread src/SpeedDial/SpeedDial.js Outdated
const rootClassName = classNames(
classes.root,
hidden && classes.hidden,
hidden && classes.hidden,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

twice the same line.

@oliviertassinari

Copy link
Copy Markdown
Member

Did you benchmark any other implementations?

Comment thread src/SpeedDial/SpeedDial.js Outdated
@@ -0,0 +1,144 @@
// @flow weak

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can remove flow

Comment thread src/SpeedDial/SpeedDial.js Outdated
import { withStyles } from 'material-ui/styles';
import Button from 'material-ui/Button';
import Icon from 'material-ui/Icon';
import AddIcon from 'material-ui-icons/Add';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, we don't rely on material-ui-icons. It needs to be an internal svg icons. We already have ~6 of them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oops, I should know that! (SpeedDial started as a docs demo, and grew from there, so was using originally material-ui-icons)

Comment thread src/SpeedDial/SpeedDial.js Outdated

const children = React.Children.map(childrenProp, (child, childIndex) => {
if (!React.isValidElement(child)) return null;
const delay = 30 * (open ? childIndex : childrenProp.length - childIndex);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My point was that the index can jump from 0, 1 to 3,4,5 if we have two null children along the way.
Hence, the delay will be wrong.

@mbrookes mbrookes Dec 20, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Struggling to imagine a situation where that would be the case? If somone's using other than SpeedDialButton, that's an error. Could you give an example?

Comment thread src/SpeedDial/SpeedDial.js Outdated
return (
<div className={rootClassName} {...other}>
<Button
id={label}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Humm. I'm wondering about id escaping here. string -> id might not be as straightforward.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Mmm... good point. I originally had a separate prop, but was trying to keep the API surface down. I've added a regex to filter the label.

Comment thread src/SpeedDial/SpeedDial.js Outdated
/**
* If `true`, the SpeedDial is open.
*/
open: PropTypes.bool,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should it be required?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Makes sense.

Comment thread src/SpeedDial/SpeedDialButton.js Outdated
@@ -0,0 +1,99 @@
// @flow weak

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can remove flow

@mbrookes mbrookes Dec 20, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oops, thought I had done. Done now.

Comment thread test/integration/MenuList.spec.js Outdated
import MenuList from 'src/Menu/MenuList';
import MenuItem from 'src/Menu/MenuItem';
import MenuList from 'src/MenuList/MenuList';
import MenuItem from 'src/MenuItem/MenuItem';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wait, what?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bah, sorry, stray change from the flat-src-dir experiment. I need to be more careful with what git add . adds (or doesn't - I see how that got missed from the other commit...)

@oliviertassinari

Copy link
Copy Markdown
Member

@mbrooks This is true benchmarking 💃 !

@mbrookes

mbrookes commented Dec 20, 2017

Copy link
Copy Markdown
Member Author

@oliviertassinari I've added up/down arrow key support. I solved the accessibility dilemma (should up/down follow the visual presentation, or the DOM structure) by supporting both.

Whichever key ('up', or 'down') is used to move focus from the base FAB to the first action is thereafter the "next" key, with the opposite focusing the previous action, (or the base FAB if there is no previous action).

It's pretty intuitive in use, and worth the extra few lines of code, and use of state IMHO.

Additional review feedback is also fixed (I hope!) in a657b7b . (Except the outstanding null child question).

Regarding the API, are you happy with SpeedDialButton (a la BottomNavigationButton), or would SpeedDialItem (like ListItem and MenuItem) be preferable, (or even SpeedDialAction)?

Also, should tooltipTitle just be label for simplicity, or keep it explicit as to its use? (For ARIA it is used for aria-label though).

Edit 2: This is done: ~~Edit: also, should the SpeedDialButton icon be its child, as it is now, or an icon prop, like BottomNavigationButton? (Point 2. here suggests the latter.)~

const styles = {
speedDial: {
position: 'fixed',
bottom: 20,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

bottom: theme.spacing.unit, so we get as much geometric symmetry as possible. Same for right.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Inbox isn't a good example to follow 😁
capture d ecran 2017-12-22 a 22 54 47

root: {
width: 56,
textAlign: 'center',
zIndex: theme.zIndex.speedDial,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Smart


const styles = theme => ({
root: {
width: 56,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think that it's needed.

Comment thread src/SpeedDial/SpeedDial.js Outdated
const styles = theme => ({
root: {
width: 56,
textAlign: 'center',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think that it's needed.

Comment thread src/SpeedDial/SpeedDial.js Outdated
flexDirection: 'column-reverse', // Display the first action at the bottom.
marginBottom: 16,
},
closedActions: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For consistency with the other classes names on the codebase: actionsClosed

Comment thread src/SpeedDial/SpeedDial.js Outdated
const actionsClassName = classNames(classes.actions, { [classes.closedActions]: !open });
const children = React.Children.map(childrenProp, (child, childIndex) => {
if (!React.isValidElement(child)) return null;
const delay = 30 * (open ? childIndex : childrenProp.length - childIndex);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing index counter to counterbalance the potential null children.

Comment thread src/SpeedDial/SpeedDial.js Outdated
<div
id={`${id}-actions`}
className={actionsClassName}
aria-labelledby={id}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

From what I can see on the Inbox implementation, the aria-labeledby should be targeting an element with some text. Here. I think that you can remove this property and the regexp that comes with it.

@mbrookes mbrookes Dec 22, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I may be mistaken, but I understood that this would in turn respect the label applied with aria-label to the element referenced by id - in our case the aria-label appied to the base Button based on the label prop.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@oliviertassinari Reading around, I think you're right. I've removed it.

Comment thread src/SpeedDial/SpeedDialButton.js Outdated
root: {
position: 'relative',
},
actionButton: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe button is enough.

Comment thread src/SpeedDial/SpeedDialButton.js Outdated
opacity: 1,
color: theme.palette.text.secondary,
},
closedActionButton: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

buttonClosed

Comment thread src/SpeedDial/SpeedDial.js Outdated
}),
},
hiddenFab: {
transform: 'scale3d(0, 0, 1)',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why using scale 3d and not?

transform: 'scale(0)',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bacause I used scale, and you asked why I wasn't using scale3d. LOL!

@mbrookes

Copy link
Copy Markdown
Member Author

@oliviertassinari I've made an attempt to deal with null children. It required two counters, as we need the total number of valid children to calculate the reverse timing for the closing animation. I'm wide-open to alternative implementations.

Comment thread src/svg-icons/Add.js
/**
* @ignore - internal component.
*/
let Add = props => (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To move with #9601

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍

@mbrookes
mbrookes requested a review from leMaik December 23, 2017 21:22
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import Button from 'material-ui/Button';
import SpeedDialButton from 'material-ui/SpeedDial/SpeedDialButton';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like the way it's exported below, so it can be imported like:

import SpeedDial, { SpeedDialButton } from 'material-ui/SpeedDial';

This still groups imports by the component they're used with.

Comment thread src/SpeedDial/SpeedDial.js Outdated
icon = <Icon>{iconProp}</Icon>;
}
} else {
icon = <AddIcon className={fabIconClassName} />;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be nice to be able to use a different icon when hovered (e.g. a plus when not hovered and a pen icon when hovered, like in Google Inbox). Maybe by adding an activeIcon prop? 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good idea.

Comment thread src/SpeedDial/SpeedDial.js Outdated
const actionsClassName = classNames(classes.actions, { [classes.actionsClosed]: !open });

// Filter the label for valid id characters.
const id = label.replace(/^[^a-z]+|[^\w:.-]+/gi, '');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So... a unique label is required?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes. The alternative was an explicit id prop, but I was trying to minimize the API surface. Given that you'd only ever have one SpeedDial visible, and if there's more than one they presumably have different purposes, it didn't seem like a major limitation, but I should probably add a note to the prop docs.

Add = pure(Add);
Add.muiName = 'SvgIcon';

export default Add;

@leMaik leMaik Dec 25, 2017

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unrelated to this PR, but would it be possible to import these icons from material-ui-icons instead of copying them?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We'd end up with a circular dependancy (material-ui-icons depends on material-uo/SvgIcon), so not sure how that would work out in practice.

@leMaik leMaik Dec 26, 2017

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh, you're right. I guess this would be possible by npm linking packages/material-ui into packages/material-ui-icons (tools like lerna might even do this automagically, but I'm not sure). Maybe we should keep it as is then.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yarn workspace is another option.

@mbrookes

mbrookes commented Dec 28, 2017

Copy link
Copy Markdown
Member Author

@leMaik openIcon is done:

kapture 2017-12-28 at 2 45 12

@oliviertassinari oliviertassinari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm still facing the same keyboard issue. Here is me pressing the down array key multiple times:
giphy

Otherwise. I can't see any important issue. I can find some time to polish the implementation if you need.

});

return (
<div>

@oliviertassinari oliviertassinari Dec 29, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For the demos. Have you considered the option to embedded the element in the demo block?
Right now, we have two demos. I can show both speed dial. They overlap.

Comment thread src/SpeedDial/index.js Outdated
@@ -0,0 +1,2 @@
export { default } from './SpeedDial';
export { default as SpeedDialButton } from './SpeedDialButton';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SpeedDialIcon ?

Comment thread src/SpeedDial/SpeedDial.js Outdated
data-mui-test="SpeedDialButton"
{...ButtonProps}
>
<SpeedDialIcon icon={icon} openIcon={openIcon} open={open} {...SpeedDialIconProps} />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What about reversing the abstraction: exposing SpeedDialIcon in the demos instead of the SpeedDialIconProps property? So people keep full control over what they add.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay.

Comment thread docs/src/pages/demos/buttons/buttons.md Outdated
@@ -1,5 +1,5 @@
---
components: Button, IconButton, ButtonBase
components: Button, IconButton, ButtonBase, SpeedDial, SpeedDialButton

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SpeedDialIcon?

@mbrookes

Copy link
Copy Markdown
Member Author

Regarding down = up: as I mentioned when you raised this concern before, this is by design. Please see: #9539 (comment)

When I saw your screenshot I thought you were now saying it loops from top to bottom, but just realise when I couldn't reproduce it that it's just your gif looping! (How are you taking a screenshot that doesn't inclue the time it takes to stop the recording? 😄)

@mbrookes

Copy link
Copy Markdown
Member Author

@oliviertassinari Regarding the API, are you happy with SpeedDialButton (a la BottomNavigationButton), or would SpeedDialItem (like ListItem and MenuItem) be preferable (Speed Dial is a sort of menu)? Or perhaps SpeedDialAction, since the MD spec calls these actions?

@oliviertassinari

Copy link
Copy Markdown
Member

@mbrookes The material specification is using the "action" wording on the bottom navigation page too. I would vote for BottomNavigationAction and SpeedDialAction .

@mbrookes

mbrookes commented Jan 1, 2018

Copy link
Copy Markdown
Member Author

Cool, thanks! I was leaning towards Action for SpeedDial, so great that BottomNav is the same. I'll change that in a separate PR.

oliviertassinari pushed a commit that referenced this pull request Jan 1, 2018
…ction (#9692)

This is for consistency with the spec, and with the upcoming SpeedDial component.
Motivated by: #9539 (comment)

### Breaking change

-Rename the `BottomNavigationButton` component

```diff
-import BottomNavigation, { BottomNavigationButton } from 'material-ui/BottomNavigation';
+import BottomNavigation, { BottomNavigationAction } from 'material-ui/BottomNavigation';
```
[SpeedDial] Fix index.js

[SpeedDial] Add to supported components

[SpeedDial] Fix most review feedback, reinstate lost commit for flex-direction

[SpeedDial] Improve the ARIA labelling

Follow: https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-links.html

[SpeedDial] Simplify layout

[SpeedDial] Add keyboard support

[SpeedDial] Support bi-directional arrow keys

[SpeedDial] Use relative imports

[SpeedDialButton] Give delay a default and make it optional (easier to test)

[SpeedDial] Use icon prop instead of children

[SpeedDial] Add some basic tests

[SpeedDial] Add regression test

[SpeedDial] Revert some unintended changes

[SpeedDial] add defaults for bool props

[SpeedDialButton] Handle enter / space key with onClick

The Tooltip wasn't closing when a SpeedDialButton was selected
using the enter / space key. By usiing a controlled Tooltip,
linking the open state of the Tooltip to the open state of the actions,
and triggering the onClick handler when a relevent key event occurs,
we can ensure that the Tooltip closes when an action is initiated by
key press.

[SpeedDial] Add support for open on hover / focus

[SpeedDial] Add API docs

[SpeedDial] Tidy up tests

Note: 'SpeedDialButton should call handleTooltipOpen & handleTooltipClose on mouseOver & blur' test is failing. Not sure why, or how to debug...

[SpeedDial] Add support for null children

[SpeedDial] Move Add icon to internal/svg-icons

[SpeedDial] Move Add icon to internal/svg-icons

[docs] Use theme.spacing.unit for SpeedDial fixed positioning

[SpeedDialButton] Simplify class names

{SpeedDial] Fix additional review feedback. Thanks @oliviertassinari!

[SpeedDial] Improve ARIA labelling

[SpeedDial] Add escape key support

Follows: https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-links.html

[SpeedDial] Test for fab ref
I have *no* clue if this is the right way to go about this!

[SpeedDial] Update API docs

[SpeedDial] Add openIcon prop & docs demo

[SpeedDial] Use Fade transition

This prevents focus conflicts when more than one SpeedDial is present but hidden.

[SpeedDial] Refactor icon code into spearate component, and fix tests

[SpeedDial] Update API docs

[SpeedDial] Expose the SpeedDialIcon component

[SpeedDial] Rename label prop to ariaLabel to better reflect its purpose

Also remove the API docs comment regarding unique names, as using the Fade transition with  mitigates this issue.

[SpeedDial] Render within Demo container

[SpeedDial] Add Zoom transition component

[SpeedDial] Persist the chosen key direction

[SpeedDial] better zIndex

[SpeedDial] Fix tests failing after rebase, and code changes

[SpeedDial] Rename SpeedDialButton to SpeedDialAction
@gregnb

gregnb commented Jan 9, 2018

Copy link
Copy Markdown
Contributor

I was looking at what components still needed to be done for v1 and I saw that the Floating action Button - Toolbar: https://material.io/guidelines/components/buttons-floating-action-button.html#buttons-floating-action-button-transitions

I didn't want to try to work on something that was being done so I searched and came across this thread. Now I know it's not the same exact component, but I was wondering though, since these all fold under FOB what if it had one general component to call that you could apply which type it was?

  <ActionButton type="Toolbar|SpeedDial|Morph|Full screen">
    ...
  </ActionButton>
   
  or

  <FloatingAction type="Toolbar|SpeedDial|Morph|Full screen">
    ...
  </FloatingAction>

Or, is it better to just keep these separate? If so, I would like to work on that Toolbar one if it's ok

@mbrookes

mbrookes commented Jan 10, 2018

Copy link
Copy Markdown
Member Author

@gregnb Thanks for raising this.

I could very easily have missed one (it's not like I've checked every app, so please correct me here!), but I'm not aware of any applications that use the FAB Toolbar approach.

@gregnb

gregnb commented Jan 10, 2018

Copy link
Copy Markdown
Contributor

@mbrookes Ah ok, I will have to defer to you on this one. I really have not done the research on the FAB Toolbar usage. Was just browsing what was on the todo list for V1 :)

@mbrookes

Copy link
Copy Markdown
Member Author

Todo list?

@gregnb

gregnb commented Jan 10, 2018

Copy link
Copy Markdown
Contributor

@mbrookes

Copy link
Copy Markdown
Member Author

Ah, right. We don't aim to (directly) support every use case, that's just to show what is supported.

@oliviertassinari oliviertassinari added the package: lab Specific to the lab. label Feb 3, 2018
@RuneKR

RuneKR commented Feb 8, 2018

Copy link
Copy Markdown

any news on when this gets merged?

@oliviertassinari oliviertassinari added this to the post v1 milestone Feb 11, 2018
@sambegin

Copy link
Copy Markdown

post v1 milestone just been added to this issue. That means we won't see it released any soon ? Any help we could provide to accelerate the process of releasing this feature ?

@oliviertassinari

Copy link
Copy Markdown
Member

post v1 milestone just been added to this issue.

@sambegin I believe we can defer the work on this enhancement. It doesn't mean @mbrookes won't push it forward.

@mbrookes

Copy link
Copy Markdown
Member Author

@oliviertassinari Shall I open a PR for the WIP lab package?

@oliviertassinari

Copy link
Copy Markdown
Member

@mbrookes Sure :)

@mbrookes

Copy link
Copy Markdown
Member Author

Closed for #10288.

@raymondsze

Copy link
Copy Markdown
Contributor

I grabbed the pull request and used in my project. Seems there is performance issue in Safari.
When the SpeedDial button is clicked, only the first SpeedDialAction is shown. The second and later SpeedDialAction show after a long delay.

@oliviertassinari

oliviertassinari commented Mar 2, 2018

Copy link
Copy Markdown
Member

@raymondsze The component was pushed on npm under @material-ui/lab.

@mbrookes
mbrookes deleted the speed-dial branch March 2, 2018 09:37
@mbrookes

mbrookes commented Mar 2, 2018

Copy link
Copy Markdown
Member Author

@raymondsze I'm looking at docs demo in Safari, and not seeing an issue. I'd suggest using the published version as @oliviertassinari mentioned.

@oliviertassinari oliviertassinari added scope: speed dial Changes related to the speed dial. and removed package: lab Specific to the lab. labels Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: speed dial Changes related to the speed dial. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants