Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Airbnb Demo #6725

Merged
merged 10 commits into from
Jun 26, 2024
Merged

Add Airbnb Demo #6725

merged 10 commits into from
Jun 26, 2024

Conversation

takameyer
Copy link
Contributor

What, How & Why?

This demo was created to demonstrate how Realm can be used as a cache for search results. It also shows various statistics in terms of disk usage and how much space the cache is using.

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 📝 Update COMPATIBILITY.md
  • 🚦 Tests
  • 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • 💥 Breaking label has been applied or is not necessary

This demo was created to demonstrate how Realm can be used as a cache for search results.
It also shows various statistics in terms of disk usage and how much space the cache is using.
@cla-bot cla-bot bot added the cla: yes label Jun 14, 2024
@takameyer takameyer added the no-jira-ticket Skip checking the PR title for Jira reference label Jun 14, 2024
examples/rn-airbnb/README.md Outdated Show resolved Hide resolved
examples/rn-airbnb/README.md Outdated Show resolved Hide resolved
Rename to MBnB
Fix the backend configuration
Updates to readme
Copy link
Contributor

@gagik gagik left a comment

Choose a reason for hiding this comment

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

Nice! The app works for me now but I needed to adjust the search index's name capitalization, after that change should be all good.

examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/backend/functions/searchListings.js Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@elle-j elle-j left a comment

Choose a reason for hiding this comment

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

[wip] First pass 🙂

examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
examples/rn-mbnb/README.md Outdated Show resolved Hide resolved
takameyer and others added 2 commits June 25, 2024 12:19
Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com>
Copy link
Contributor

@elle-j elle-j left a comment

Choose a reason for hiding this comment

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

[wip]

Copy link
Contributor

@elle-j elle-j Jun 25, 2024

Choose a reason for hiding this comment

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

Would be nice to also enforce some linting consistency like e.g.:

  • " vs '
  • {someName} vs { someName }
  • Trailing commas
  • End with ;

Perhaps we can extend some recommended configs.

Copy link
Contributor Author

@takameyer takameyer Jun 25, 2024

Choose a reason for hiding this comment

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

It's probable that I never ran proper prettier/linting over this code.
Is the issue that the formatting differs from the other examples? Most probable it is because Expo comes with its own defaults.

I think generally just using the default of whatever platform is being used would be fine. Development teams will generally override this at some point anyway. If our example code hasn't applied the linting/prettier rules though, we should update that.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think having some things differ from the other examples is fine from my point of view, it's mainly that it'd be good to keep it consistent within the project itself.

examples/rn-mbnb/App.js Show resolved Hide resolved
examples/rn-mbnb/app/AirbnbList.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/app/AirbnbList.tsx Show resolved Hide resolved
examples/rn-mbnb/app/AirbnbList.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/app/AirbnbList.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/app/AirbnbList.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/app/AirbnbList.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/app/AirbnbList.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@elle-j elle-j left a comment

Choose a reason for hiding this comment

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

Awesome Andrew! 🥳 Thank you so much for adding this, definitely an interesting and helpful use case to have!

examples/rn-mbnb/app/AnonAuth.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/app/AnonAuth.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/app/AppWrapper.tsx Show resolved Hide resolved
examples/rn-mbnb/app/AppWrapper.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/app/AppWrapper.tsx Outdated Show resolved Hide resolved
examples/rn-mbnb/backend/functions/searchListings.js Outdated Show resolved Hide resolved
examples/rn-mbnb/backend/functions/searchListings.js Outdated Show resolved Hide resolved
examples/rn-mbnb/backend/functions/searchListings.js Outdated Show resolved Hide resolved
examples/rn-mbnb/backend/functions/searchListings.js Outdated Show resolved Hide resolved
examples/rn-mbnb/search.js Outdated Show resolved Hide resolved
Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com>
@takameyer takameyer merged commit 52700f5 into main Jun 26, 2024
20 checks passed
@takameyer takameyer deleted the andrew/airbnbdemo branch June 26, 2024 11:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes no-jira-ticket Skip checking the PR title for Jira reference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants