question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename Fab component to FAB or FloatingActionButton

See original GitHub issue

The Fab components capitalization is a bit misleading as its an acronym; one would expect it to be named FAB; however, FloatingActionButton would be ideal for clarity and consistency with the rest of the Material-UI API.

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Context 🔦

Abbreviations and Acronyms hurt a projects readability, as they add to cognitive load, tribal knowledge, and are often considered a ‘code smell’. Grammatically, the main exception would be acronyms that are universally used in everyday language, such as LASER. ‘Fab’ is also used as an abbreviation in words such as prefab which is short for prefabricated, which makes the meaning harder to grok if you do not know the context.

Google uses a mixture of Floating Action Button in their documentation and they do use FAB after explaining the acronyms origin. Their various Google APIs also uses a mixture of FloatingActionButton and FAB as in acronym form, usually when FAB is combined with another component. I have yet to find any Google API’s that have used FAB as an abbreviation for the actual button. Lastly, to be fair and play devil’s advocate, I must admit that ‘Fab’ does show up in Angular docs; however, I would argue that this is a side effect of their documentation generation tools, as the API is lower case kebab-case.

Lastly, while renaming material-ui/packages/material-ui/src/Fab/Fab.js to material-ui/packages/material-ui/src/FAB/FAB.js would be more clearly show that the word is intended as an acronym, it might also create issues for users with case insensitive operating systems. I would thus recommend to go with material-ui/packages/material-ui/src/FloatingActionButton/FloatingActionButton.js, which would avoid any linting errors that FAB might introduce and be much more obvious to individuals less savvy of Material Design jargon.

Thank you for your time and consideration.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
oliviertassinaricommented, Mar 26, 2019

I agree with @liesislukas here. People find that we release too many breaking changes. The name of the component match our acronym convention:

  • CssBasline over CSSBaseline
  • Fab over FAB
  • NoSsr over NoSSR

I’m moving the concern to v5.

2reactions
joglrcommented, Jan 13, 2019

I like the verbose FloatingActionButton, since the other names convey little meaning, unless you know the abbreviation. I agree though that it is a bit of a mouthful, but I still think the long name is better. There’s already other components with such long names, such as BottomNavigationAction.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rename Fab component to FAB or FloatingActionButton #14135
The Fab components capitalization is a bit misleading as its an acronym; one would expect it to be named FAB; however, FloatingActionButton ......
Read more >
Floating Action Button (FAB) in Android with Example
In the activity_main.xml file add the floating action buttons and invoke the following code. Now invoke the normal FAB. Which is of 56dp...
Read more >
React Floating Action Button (FAB) component - Material UI
A floating action button appears in front of all screen content, typically as a circular shape with an icon in its center. FABs...
Read more >
Floating action button android change icon - Stack Overflow
Use the design editor and when you click on the FAB scroll down to the src and click that little square button with...
Read more >
How to create FAB buttons - Figma tutorial - Captain Design
A floating action button (FAB) does the primary, or most common, action on a screen. It appears in front of everything else on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found