Internal "." prefaced components published to library

I’ve now had two components designated as internal to my design system library file via a “.” preface end up published as part of the library. Was able to resolve this bug in one instance by changing the “.” to an “_”. In the other instance, I had actually intended to publish the component and ultimately removed the “.”, so this wasn’t a big deal.

Per Figma documentation on publishing components to libraries, prefacing components with either a period or an underscore should prevent them from being published. I have many other internal components in this file that are respecting their “.” preface, so I’m not sure what might be causing this bug. Any ideas?

1 Like

The issue is that components that should be hidden from library users were being published to our design system, even with the . preface which should designate them as private to the file.

I believe both of these instances happened prior to the new Figma release that allows the user to select which components are published. This new feature decreases the risk of private components being accidentally published in our libraries.

I’m just confused how private components were ever publishable in the first place, since both . and _ prefaces should keep them internal. If this bug arises again, we risk confusing our design system users if they accidentally use .base components that don’t have all the variants to support our brand themes and color modes.

What’s said in the previous message can work the other way around. Basically by right clicking the component and removing/adding it to library manually you can override the automatic . and _ removal from the library. And when you changed the name from . to _ the automatic removal was applied again overriding the manual addition.

Or this could be a bug of course, in this case you need to report it to Figma support team via the bug report form.

1 Like

We are experiencing this issue as well, in our libraries. Is this a known, verified bug at this point? Do you know, @Gleb ?

When I open the “Team Library” -view, and select the “Current file >” it should show me a list of all the published components of the library, right? Well, these components that are in the library and prefaced with a dot (e.g. .base-ComponentName) are not listed in this view, so they shouldn’t be published and thus not listed in the “Assets” view in any of the files using the library.

Yet, when check the “Assets”-view in the files using this library, I can see the .-components in the list. They even come up in the search, if I put a “.” in the search query. However, not all of them (weirdly), only some.

Is there’s nothing I can do to prevent these components from appearing in the “Assets”-list in other files? To my understanding, we have done everything we can to prevent this. E.g. naming the components correctly when published.

1 Like

I don’t think this is related to the issue previously discussed here, seems like a different bug. Report it to Figma support with a video recording and links to files.

To diagnose: does unpublishing and publishing the library again help? Make sure the components that you want to publish are correct in the publish window.

1 Like

It was actually happening to me as well but only with certain internal/private components. Thus, I simply tried to rename them (from “_Component” to “Component” and back to “_Component”) and now they are hidden. It is weird though.

This happened to me as well, I had created “_Base”, etc. and then published my library for the first time, and these components showed up in connected documents.

Renaming them to “.Base”, and then republishing them got rid of them.

1 Like