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

Display Notes on Activity view #2292

Merged
merged 6 commits into from
Sep 16, 2024

Conversation

shubhamkmr04
Copy link
Contributor

@shubhamkmr04 shubhamkmr04 commented Jul 18, 2024

Simulator Screenshot - iPhone 15 Pro - 2024-07-23 at 20 27 16

@kaloudis kaloudis added this to the v0.9.1 milestone Jul 18, 2024
@shubhamkmr04 shubhamkmr04 force-pushed the shubham/upgrade-notes-feature branch from a7504db to daa11f9 Compare July 23, 2024 14:48
@shubhamkmr04 shubhamkmr04 force-pushed the shubham/upgrade-notes-feature branch from daa11f9 to b1316e6 Compare July 23, 2024 14:53
@shubhamkmr04 shubhamkmr04 marked this pull request as ready for review July 23, 2024 14:57
Copy link
Contributor

@kaloudis kaloudis left a comment

Choose a reason for hiding this comment

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

Simulator Screenshot - iPhone 15 Plus - 2024-08-27 at 11 47 31

I think we should have a max char limit on the display preview here.

Note label is also rendered oddly here.

@shubhamkmr04
Copy link
Contributor Author

Simulator Screenshot - iPhone 15 Plus - 2024-08-27 at 11 47 31

I think we should have a max char limit on the display preview here.

Note label is also rendered oddly here.

Simulator Screenshot - iPhone 15 Pro - 2024-09-03 at 17 00 45

Fixed the notes overlapping and the char limit to 150, you think it would work ?

@kaloudis
Copy link
Contributor

kaloudis commented Sep 4, 2024

Looking good now, visually.

simulator_screenshot_C304922D-BC84-4C9D-92EC-6700979F63C0

@@ -345,6 +349,8 @@ export default class Wallet extends React.Component<WalletProps, WalletState> {

LnurlPayStore.reset();

NotesStore?.loadNoteKeys();
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe we need to load this every time we hit the wallet screen. On connecting should suffice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, we have covered that in 2393

views/Activity/Activity.tsx Outdated Show resolved Hide resolved
@kaloudis
Copy link
Contributor

kaloudis commented Sep 4, 2024

We need to rebase this too, once ready. Please rewind your commits and rebase instead of doing a merge commit, please.

@kaloudis kaloudis added Notes Activity Activity view labels Sep 4, 2024
@shubhamkmr04 shubhamkmr04 force-pushed the shubham/upgrade-notes-feature branch 4 times, most recently from 8ff79ac to 4739416 Compare September 10, 2024 10:46
const key: any =
this.state.txid ||
this.state.payment_hash ||
this.state.getRPreimage;
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change? you're loosening the typing and seemingly breaking the fetching of the key here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we were getting type error here like Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. once I removed here- because it was already coming in getNoteKey

@@ -71,8 +70,7 @@ export default class AddNotes extends React.Component<
const { notes } = this.state;

const saveNote = async () => {
const key: string =
'note-' + (payment_hash || txid || getRPreimage);
const key: any = payment_hash || txid || getRPreimage;
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

'note-' +
(payment_hash || txid || getRPreimage);
const key: any =
payment_hash || txid || getRPreimage;
Copy link
Contributor

Choose a reason for hiding this comment

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

same here. I do not understand the changes to this file

@@ -91,7 +91,9 @@ export default class InvoiceView extends React.Component<InvoiceProps> {
const EditNotesButton = () => (
<TouchableOpacity
onPress={() =>
navigation.navigate('AddNotes', { getRPreimage: noteKey })
navigation.navigate('AddNotes', {
getRPreimage: getNoteKey
Copy link
Contributor

Choose a reason for hiding this comment

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

I really dislike the name of the prop we're passing in here. Doesn't it work better as noteKey or something akin to that?

getPaymentRequest
} = payment;
const date = getDisplayTime;

const EditNotesButton = () => (
<TouchableOpacity
onPress={() =>
navigation.navigate('AddNotes', { payment_hash: noteKey })
navigation.navigate('AddNotes', {
payment_hash: getNoteKey
Copy link
Contributor

Choose a reason for hiding this comment

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

same here with the prop name here. do we handle these differently?

nit: also confused by the different casing

Copy link
Contributor

@kaloudis kaloudis left a comment

Choose a reason for hiding this comment

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

tACK

@kaloudis kaloudis merged commit 62164c9 into ZeusLN:master Sep 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Activity Activity view Notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants