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

Added notification item code #528

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

Megha-Dev-19
Copy link
Collaborator

Resolves #505

@Megha-Dev-19
Copy link
Collaborator Author

Megha-Dev-19 commented Nov 28, 2023

@elliotBraem @ailisp
After getting this merged I will ask Eugene to update this to devhub.near account
and I have created a draft PR for near org here
please let me know if any other change is required or if I m wrong somewhere
And if there is any way to test these changes
Thanks

src/DevGov/Notification/Item/Left.jsx Outdated Show resolved Hide resolved
? "mentioned you in their"
: "???"}{" "}
<a className="fw-bold text-muted" href={href("post", { id: props.post })}>
DevHub post
Copy link
Contributor

Choose a reason for hiding this comment

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

Then this <a tag should have

href={to={href({
    widgetSrc: "${REPL_DEVHUB}/widget/app",
    params: {
      page: "post",
      id: props.id
    },
  })}

Although according to the story, the issue here is that for blogs, we should be pointing to blog instead:

to={href({
    widgetSrc: "${REPL_DEVHUB}/widget/app",
    params: {
      page: "blog",
    },
  })}

But we don't have access to the post type at this moment...

Maybe when we create the notification (author posting the blog), we could pass the postType of where it's coming from?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The other way could be redirect on the post widget, if it's a blog type, redirect to related blog page

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah we don't know when it's a blog or post notification

src/DevGov/Notification/Item/Right.jsx Outdated Show resolved Hide resolved
@elliotBraem
Copy link
Contributor

@Megha-Dev-19 it's a good start!

As per testing, this is something we could do:

For near.social, copy and paste the mob.near/widget/NotificationFeed code to local (and any relevant child components) so that we are serving the code locally. It could just be to a temp directory under src/ or something like that.

Then, we can create or edit a blog from devhub-test community, adding a mention to your name. We should be able to look at this new notification through our local "forked" notification feed.

@Megha-Dev-19
Copy link
Collaborator Author

@elliotBraem @ailisp can we merge this PR.? Will update the code further according to contract changes?
I have applied your suggestions

Copy link
Collaborator

@ailisp ailisp left a comment

Choose a reason for hiding this comment

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

This looks good to me. @elliotBraem Could you review again? It's currently blocking from your request changes.

@elliotBraem elliotBraem merged commit 3d43c38 into NEAR-DevHub:main Dec 4, 2023
2 checks passed
@Megha-Dev-19 Megha-Dev-19 deleted the fix-notifications branch December 13, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants