PHS-TSA / nexus

The application for movers, shakers, and makers
0 stars 0 forks source link

Fancy Posts #39

Open lishaduck opened 4 days ago

lishaduck commented 4 days ago

Thanks for contributing! Provide a description of your changes below and a general summary in the title. Please look at the following checklist to ensure that your PR can be accepted quickly:

Once you've read over these comments, you should delete them.

Description

Describe your changes in a sentence or two.

This PR...

Which issue does this close? If none, quickly write up a more detailed issue so any non-development-related discussion can go there.

Closes: #issue

CC: @MattsAttack


Type of Change

Delete all non-applicable categories.

Checklist

Before submitting the PR, please make sure you do the following:

Tested on

What device(s) have you tested this on? Delete all non-applicable examples.

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 47.53086% with 85 lines in your changes missing coverage. Please review.

Project coverage is 42.45%. Comparing base (45544f5) to head (05a45d2).

Files with missing lines Patch % Lines
...rc/features/auth/presentation/auth/login_page.dart 0.00% 30 Missing :warning:
packages/app/lib/src/app/wrapper_page.dart 0.00% 21 Missing :warning:
.../lib/src/features/home/presentation/home/post.dart 74.13% 15 Missing :warning:
.../src/features/map/presentation/items/map_page.dart 0.00% 10 Missing :warning:
...pp/lib/src/features/home/data/post_repository.dart 0.00% 4 Missing :warning:
...c/features/auth/presentation/auth/signup_page.dart 0.00% 2 Missing :warning:
...ib/src/features/home/application/feed_service.dart 0.00% 2 Missing :warning:
...rc/features/home/application/location_service.dart 50.00% 1 Missing :warning:
Files with missing lines Coverage Δ
packages/app/lib/src/app/app.dart 4.54% <ø> (ø)
packages/app/lib/src/app/router.dart 70.45% <100.00%> (+1.40%) :arrow_up:
.../src/features/home/application/avatar_service.dart 100.00% <100.00%> (ø)
.../lib/src/features/home/data/avatar_repository.dart 100.00% <100.00%> (ø)
.../app/lib/src/features/home/domain/post_entity.dart 0.00% <ø> (ø)
.../lib/src/features/home/presentation/home/feed.dart 100.00% <100.00%> (ø)
...ures/home/presentation/home/feed_routing_page.dart 100.00% <100.00%> (ø)
...rc/features/home/application/location_service.dart 75.00% <50.00%> (-25.00%) :arrow_down:
...c/features/auth/presentation/auth/signup_page.dart 0.00% <0.00%> (ø)
...ib/src/features/home/application/feed_service.dart 41.17% <0.00%> (-2.58%) :arrow_down:
... and 5 more

... and 1 file with indirect coverage changes

lishaduck commented 4 days ago

@MattsAttack, you pushed a rebase instead of force pushing, so I had to clean it up. Run git reset origin/fancy-posts.

MattsAttack commented 4 days ago

My bad

lishaduck commented 4 days ago

My bad

Oh, and I did it wrong myself. Give me a few minutes.

lishaduck commented 4 days ago

Ok, you can run git reset --hard origin/fancy-posts now. Keep in mind that it'll wipe everything, so make sure there's nothing unstaged. If there is, memorize it 😉

MattsAttack commented 3 days ago

@lishaduck I believe there's an issue with the app not requesting the users location and then not loading in the local feed. The pop up to request location only pops up sometimes on web and if doesn't theres no way to load in the local feed

lishaduck commented 3 days ago

Might be fixed with #44?

MattsAttack commented 1 day ago

@lishaduck how should I go about getting a username from a user id?

lishaduck commented 1 day ago

@lishaduck how should I go about getting a username from a user id?

For security reasons you, erm, can't. I spent a lot of time looking into it, and it looks like you'd need to a) write a server function, or b) store a user-id => preferred name mapping in a new db collection, which would be annoying. I pitched it as being anonymous for that reason in the script.

MattsAttack commented 1 day ago

For security reasons you, erm, can't.

What if I just added an attribute to posts that stores the person who created its user name? That should be pretty simple.

lishaduck commented 1 day ago

For security reasons you, erm, can't.

What if I just added an attribute to posts that stores the person who created its user name? That should be pretty simple.

Hm. That'd be fine assuming that we don't allow changing your display name.

MattsAttack commented 1 day ago

Hm. That'd be fine assuming that we don't allow changing your display name.

That's true. But if they were to change it we could update the value of the posts the users made in the data base with their new user name. It's not the best but its probably better than sending an api call every time you load a post

lishaduck commented 1 day ago

That's true. But if they were to change it we could update the value of the posts the users made in the data base with their new user name. It's not the best but its probably better than sending an api call every time you load a post

It would take a while and we could cache it, but yeah, I think it'd be fine. Just write it :)

MattsAttack commented 1 day ago

It would take a while and we could cache it, but yeah, I think it'd be fine. Just write it :)

Ai ai captain