firebase / firebase/firebase-tools-ui

Sub-collections of docs with colon in the doc id are not shown

Open
#566 11 comments 1 reaction 0 assignees View on GitHub
bug internal-bug-filed
Dominant language
TypeScript
Stars
291
Forks
74
PR merge metrics
No merged PRs in 30d

Description

If I write to a sub-collection of a non-existing doc, like so (haven't written any data to the doc `region:1` prior to this):
```
db.collection("servers").doc("region:1").collection("instances").doc("instanceA").set({...})
```

...and if I navigate to the `servers` collection in the emulator UI, then:

1. the non-existing doc `region:1` is shown in italics just as how FIrebase's web console handles the situation ✅

2. after clicking the non-existing doc `region:1`, it does **not** present any sub-collections though! ❌ whereas if I reproduce these steps in Firestore proper I can see the `instances` sub-collection in Firebase's web console at this point

3. if I now add the `instances` sub-collection via the emulator UI - at which point I am asked to also add a doc: I add the doc `instanceB` - then I am able to see both the `instanceA` doc created via code as per above and the `instanceB` doc 🥳 so mainly a UI listing bug of some sort: the emulator does appear to store the data of `instanceA` in this situation just like Firestore proper does.

4. If I reload the emulator UI browser window at this point, the `instances` sub-collection is hidden again, i.e. the workaround presented in 3 does not persist beyond a page reload.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.