Giter Club home page Giter Club logo

sveltefirets's People

Contributors

fabianmossberg avatar jacob-8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sveltefirets's Issues

How to properly package link for local dev and also allow `npm ci` to still work?

When I push to the main branch with a new package version, I would GitHub actions to publish the new version, but I get this error upon the action running npm ci:

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/runner/work/sveltefirets/sveltefirets/node_modules/sveltefirets/node_modules/sveltefirets/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/runner/work/sveltefirets/sveltefirets/node_modules/sveltefirets/node_modules/sveltefirets/package.json'
npm ERR! enoent This is related to npm not being able to find a file.

I know it has to do with how I'm referring to sveltefirets as "sveltefirets": "file:./package", in my package.json but don't know to fix. I have set it up this way so after my changes to my package I can run 'npm run package' and Vite automatically updates my demo app. Anyone know how to help me with this?

Handle loading state

In your 0-FirebaseUI-for-web example there is

{#if $user}
   User authenticated
{:else}
   {LoginComponent}
{/if}

https://github.com/jacob-8/sveltefirets/blob/main/packages/demo/src/routes/1-auth/0-FirebaseUI-for-web/%2Bpage.svx#L13

With this example when loading the page it show the {LoginComponent} until the $user is populated.

google_screen_recording_2022-10-22T13-01_02.118Z.webm (second 00:04 of the video)

As the $user variable result null if not authenticated, is there a simple way to handle the loading state of the $user variable to show a loader until $user finish loading (either result null or the user object)?

(I tried using {#await ...} but without success)

[question] How does it compares with RxFire?

I understand this code let you access Firestore collections as stores (observables), right? Isn't that what RxFire does?
Am I missing something here?

Also, I don't get the OnLine methods. What are they for? I thought Firestore handled the offline case transparently for the developer.

Firebase JS SDK packages not found for SSR when deployed to Vercel

When clicking the Load firestore data for all messages server-side I receive a few different errors: Service firestore is not available or QueryLimitConstraint is not a constructor or The "path" argument must be of type string or an instance of URL. Received undefined and when clicking the Messages API endpoint link in the demo app I receive the same. The error varies based on what piece of Firebase/Firestore is needed first (and also possibly the state of the Vercel hot/cold server instance?). Firebase imports simply don't exist server side when deployed to Vercel.

If you pull down the code you'll find that everything works as expected when running npm run dev and also works great if you npm run build and npm run preview. Something gets lost when deployed to Vercel and I don't understand how to fix it.

The same problems are exhibited in https://github.com/jacobbowdoin/jia-you that imports the sveltefirets package from npm and is not just an internal link. See the Service firestore is not available error when trying to export my characters using this link.

@benmccann do you have any ideas for me? I could post this issue in the Vercel adapter but didn't know if it belongs there. This is my last hurdle to solve before I'm able to have a great server+client experience. As seen in src\routes\[messageId].svelte I'm able to use const message = await getDocument<IMessage>(messages/${params.messageId}, firebaseApp); to fetch a document using Firestore's REST api server side and also load it client side from the Firestore cache if a user has already loaded the document. For me that's a big win to be able to do both of those with one line. The same goes for collections.

Message API endpoint is broken

In KitchenSink, when clicking in "Preload firestore data for all messages in the client" link (or any other that uses api/messages) there is an error: Not found: /messages
Noticed it is using 'get' instead of 'GET'.

[NOT AN ISSUE] Very great project!

Sorry for the non issue.

I just took a look at the documentation and is very well made.

I would suggest to add a donation button so people can support your work. Keep it up!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.