add deeplinks and support browser history #45

Merged
offbyn merged 3 commits from deeplink-notes-and-profile into master 2 years ago
offbyn commented 2 years ago
Owner

Added deeplinks with browser history support. Each note and author
have now a detail view under nostr.ch/<event-id-or-pubkey> in a
future commit also /e/<event-id> and /p/<pubkey> could be supported.

User can now navigate with browser back (with the expection of the
settings overlay).

Not everything is supported in the detail view (yet) i.e reply and
stars are partially working (dont update visually), leaving this as
open bug. This should fix itself once only 1 render container is
used instead of different divs in the html for each view.

Ideally the detail view should also query for related events,
something to add in a future commit

updates #7 and #8

Added deeplinks with browser history support. Each note and author have now a detail view under `nostr.ch/<event-id-or-pubkey>` in a future commit also `/e/<event-id>` and `/p/<pubkey>` could be supported. User can now navigate with browser back (with the expection of the settings overlay). Not everything is supported in the detail view (yet) i.e reply and stars are partially working (dont update visually), leaving this as open bug. This should fix itself once only 1 render container is used instead of different divs in the html for each view. Ideally the detail view should also query for related events, something to add in a future commit updates #7 and #8
offbyn added 3 commits 2 years ago
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details
2683b072fe
profile: update kind 0 name and picture
Notes often miss name or picture of authors if the note was
rendered before any metadata (kind 0) has been recieved.

Update name and picture of existing notes. Pictures are only
updated if a valid url.
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details
0ddd3f0df4
feed: add deeplinking and browser history
Added deeplinks with browser history support. Each note and author
have now a detail view under nostr.ch/<event-id-or-pubkey> in a
future commit also /e/<event-id> and /p/<pubkey> could be supported.

User can now navigate with browser back (with the expection of the
settings overlay).

Not everything is supported in the detail view (yet) i.e reply and
stars are partially working (dont update visually), leaving this as
open bug. This should fix itself once only 1 render container is
used instead of different divs in the html for each view.

Ideally the detail view should also query for related events,
something to add in a future commit
offbyn requested review from x1ddos 2 years ago
offbyn reviewed 2 years ago
src/main.js Outdated
@ -58,0 +194,4 @@
function showFeed() {
feedContainer.hidden = false;
detailContainer.hidden = true;
}
offbyn commented 2 years ago
Poster
Owner

planing to change this to manage views by add to/removing container elements to the dom.

planing to change this to manage views by add to/removing container elements to the dom.
offbyn reviewed 2 years ago
offbyn reviewed 2 years ago
src/main.js Outdated
@ -6,2 +6,2 @@
pool.addRelay('wss://relay.nostr.info', {read: true, write: true});
pool.addRelay('wss://relay.damus.io', {read: true, write: true});
// pool.addRelay('wss://relay.nostr.info', {read: true, write: true});
// pool.addRelay('wss://relay.damus.io', {read: true, write: true});
offbyn commented 2 years ago
Poster
Owner

oups forgot,Ill revert this.

oups forgot,Ill revert this.
offbyn marked this conversation as resolved
offbyn force-pushed deeplink-notes-and-profile from 0ddd3f0df4 to 92ae917389 2 years ago
offbyn force-pushed deeplink-notes-and-profile from 92ae917389 to de97f93633 2 years ago
x1ddos approved these changes 2 years ago
x1ddos left a comment
Owner

lgtm. i think it's a good first step. ship it!

lgtm. i think it's a good first step. ship it!
src/main.js Outdated
@ -420,0 +620,4 @@
}
}
if (user.pubkey === pubkey) {
console.log('my own', user)
x1ddos commented 2 years ago
Owner

remove this?

remove this?
offbyn marked this conversation as resolved
offbyn force-pushed deeplink-notes-and-profile from de97f93633 to c9ecf17108 2 years ago
offbyn force-pushed deeplink-notes-and-profile from c9ecf17108 to cd99b5e5c1 2 years ago
offbyn merged commit cd99b5e5c1 into master 2 years ago
offbyn deleted branch deeplink-notes-and-profile 2 years ago
offbyn commented 2 years ago
Poster
Owner

oups, I completely forgot, now there is 404

https://nostr.ch/ac26bf415e1440c3727571366566605030b81d86c2d6a829ac7b6c4183539a43

@x1ddos i think the server should always return index.html .. and i am not sure but guess it should be 200 not 404 🤔

oups, I completely forgot, now there is 404 https://nostr.ch/ac26bf415e1440c3727571366566605030b81d86c2d6a829ac7b6c4183539a43 @x1ddos i think the server should always return index.html .. and i am not sure but guess it should be 200 not 404 🤔

Reviewers

x1ddos approved these changes 2 years ago
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
The pull request has been merged as cd99b5e5c1.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b deeplink-notes-and-profile master
git pull origin deeplink-notes-and-profile

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff deeplink-notes-and-profile
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: nostr/nostrweb#45
Loading…
There is no content yet.