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

feat: Implement add post UI [BD-03][TNL-1618][BB-2970] #6

Merged
merged 5 commits into from Aug 27, 2021

Conversation

0x29a
Copy link
Contributor

@0x29a 0x29a commented Sep 28, 2020

This PR contains the UI for adding of post.

JIRA tickets:

Screenshots:
2021-08-26_15-05

Testing instructions:

  1. Clone this repo.
  2. Install dependencies and run dev server:
    npm install
    npm start
  3. Open http://localhost:2002/discussions/course-v1:edX+DemoX+Demo_Course/.
  4. Click "Add Post" and make sure the interface is matching the mock-up.

Reviewers

@openedx-webhooks
Copy link

openedx-webhooks commented Sep 28, 2020

Thanks for the pull request, @0x29a! I've created BLENDED-607 to keep track of it in Jira. More details are on the BD-03 project page.

When this pull request is ready, tag your edX technical lead.

@openedx-webhooks openedx-webhooks added blended PR is managed through 2U's blended developmnt program waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Sep 28, 2020
Copy link
Contributor

@xitij2000 xitij2000 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 for the most part, however I think we need to keep in mind that this UI won't just be used for adding posts, but for editing them as well.

While that is out of scope of this PR, I think it can affect how key variables are named.

src/data/constants.js Outdated Show resolved Hide resolved
src/discussions/posts/data/slices.js Outdated Show resolved Hide resolved
@@ -36,6 +36,7 @@ const coursePostsSlice = createSlice({
topicPostMap: {
// Mapping of topic ids to posts in them
},
postAddingInProgress: true,
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 this should be renamed to: showPostEditor or similar

src/discussions/posts/post-add/PostAdd.jsx Outdated Show resolved Hide resolved
@0x29a 0x29a force-pushed the 0x29a/bb2970/add_post_ui branch 2 times, most recently from a8d5dee to 794ec44 Compare June 27, 2021 21:21
Copy link
Contributor

@xitij2000 xitij2000 left a comment

Choose a reason for hiding this comment

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

I've left a few general comments, other than that it looks OK.
👍

  • I tested this: tested on devstack
  • I read through the code
  • I checked for accessibility issues

},
});

export default messages;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems the general convention for edX projects is to use camel case here as well. Could you update these message keys accordingly?

Copy link
Contributor Author

@0x29a 0x29a Jul 1, 2021

Choose a reason for hiding this comment

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

I've found even dot notation. 🤔

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 that guidance in frontend-platform’s doc is a bit antiquated. Using a short camelCase string for the object key is fine, so long as the id is also globally unique in the MFE. I have seen these too in the code but uts just easier to read than remembering some big long dot-delimited string.

src/discussions/posts/post-editor/PostEditor.jsx Outdated Show resolved Hide resolved
@awaisdar001
Copy link
Contributor

Is there a Jira related to this? if not, can you create that?

@xitij2000
Copy link
Contributor

@awaisdar001 Sure. There is an existing ticket. @0x29a will update the PR to include those details.

@0x29a 0x29a changed the title [BD-03] Implement add post UI [BD-03][TNL-1618][BB-2970] Implement add post UI Jul 1, 2021
@0x29a 0x29a changed the title [BD-03][TNL-1618][BB-2970] Implement add post UI feat: Implement add post UI [BD-03][TNL-1618][BB-2970] Jul 1, 2021
@asadazam93
Copy link
Contributor

@0x29a Any updates on this PR?

@0x29a
Copy link
Contributor Author

0x29a commented Jul 16, 2021

Hi @asadazam93, I'm going to rebase & test this today, or on Monday. I will ping you once this is ready for final review.

@0x29a 0x29a force-pushed the 0x29a/bb2970/add_post_ui branch 2 times, most recently from b9a574c to 43ff126 Compare July 19, 2021 09:50
@0x29a 0x29a marked this pull request as ready for review July 19, 2021 09:56
@openedx-webhooks openedx-webhooks added needs triage and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Jul 19, 2021
@0x29a
Copy link
Contributor Author

0x29a commented Jul 19, 2021

@asadazam93, this is ready for edX review.

@mehaknasir
Copy link
Contributor

@0x29a I don't have access to the attached tickets and there is no description provided as context to the done work. can you please add some description to the PR

Copy link
Contributor

@mehaknasir mehaknasir left a comment

Choose a reason for hiding this comment

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

add PR description explaining purpose of PR.
remove font awesome icon with paragon icons.
fix lint error

src/discussions/posts/post-editor/PostEditor.jsx Outdated Show resolved Hide resolved
src/discussions/posts/post-editor/PostEditor.jsx Outdated Show resolved Hide resolved
@xitij2000 xitij2000 force-pushed the 0x29a/bb2970/add_post_ui branch 2 times, most recently from 14a9074 to b5fc44f Compare August 3, 2021 11:57
@xitij2000
Copy link
Contributor

Screenshot 2021-08-03 at 12-04-06 Discussions localhost
Updated UI to match new mockups.

Copy link
Contributor

@mehaknasir mehaknasir left a comment

Choose a reason for hiding this comment

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

I didn't had the Figma designs related to this PR before, now I get it and feel like even if this PR is only related to UI still its not even close to mock designs
https://www.figma.com/file/LVFnO9oRHYiamoicZuXDAC/Discussion-page?node-id=1918%3A57140

can you please confirm about that?? @xitij2000 @0x29a

@mehaknasir
Copy link
Contributor

I didn't had the Figma designs related to this PR before, now I get it and feel like even if this PR is only related to UI still its not even close to mock designs
https://www.figma.com/file/LVFnO9oRHYiamoicZuXDAC/Discussion-page?node-id=1918%3A57140

can you please confirm about that?? @xitij2000 @0x29a

Okay I think I was looking at old screenshot. the new one looks fine to me. never mind

@mehaknasir
Copy link
Contributor

on clicking add post UI is crashing and there are so many console errors can you please look into these issues
Screenshot 2021-08-04 at 4 45 58 PM

@mehaknasir
Copy link
Contributor

on clicking add post UI is crashing and there are so many console errors can you please look into these issues
Screenshot 2021-08-04 at 4 45 58 PM

@xitij2000 any update on this one?

@xitij2000
Copy link
Contributor

@xitij2000 any update on this one?
I am not seeing this error at all. Did you run npm install after checking out this branch?

@mehaknasir
Copy link
Contributor

mehaknasir commented Aug 9, 2021

@xitij2000 any update on this one?
I am not seeing this error at all. Did you run npm install after checking out this branch?

@xitij2000 yes of course I did, I will check again can you please tell me any backend setting that should be there for running? I am running latest studio code

@mehaknasir
Copy link
Contributor

https://www.figma.com/file/LVFnO9oRHYiamoicZuXDAC/Discussion-page?node-id=1918%3A57140

The view is visible now, the design does not match Figma, the upper action bar I am not sure if that is part of ticket but that's completely different. apart from that the Add a post section is missing bug/issue option and the post editor is missing all the editing options and design does not contain follow this post and post anonymous options here.

Figma link is attached

@xitij2000
Copy link
Contributor

The view is visible now, the design does not match Figma, the upper action bar I am not sure if that is part of ticket but that's completely different. apart from that the Add a post section is missing bug/issue option and the post editor is missing all the editing options and design does not contain follow this post and post anonymous options here.

I think you have the wrong link there. The design I'm following is here: https://www.figma.com/file/LVFnO9oRHYiamoicZuXDAC/Discussion-page?node-id=1918%3A53114

I think it's a bit confusing because there are a few similar but different views around floating around.

The bug/issue feature will come in a far future milestone. The post editor is part of a different PR since we need to investigate how exactly to integrate it here.

Copy link
Contributor

@awais-ansari awais-ansari left a comment

Choose a reason for hiding this comment

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

As this PR is purely related to UI design. So there are many differences between current UI design and Figma Design.

src/discussions/posts/post-editor/PostEditor.jsx Outdated Show resolved Hide resolved
src/discussions/posts/post-editor/PostEditor.jsx Outdated Show resolved Hide resolved
src/discussions/posts/post-editor/PostEditor.jsx Outdated Show resolved Hide resolved
src/discussions/posts/post-editor/PostEditor.jsx Outdated Show resolved Hide resolved
@0x29a
Copy link
Contributor Author

0x29a commented Aug 26, 2021

@awais-ansari, I think I've addressed all comments. Also, I've updated the screenshot in the PR description.

Copy link
Contributor

@mehaknasir mehaknasir left a comment

Choose a reason for hiding this comment

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

Looks good to me

@mehaknasir mehaknasir merged commit a380ee3 into openedx:master Aug 27, 2021
@0x29a 0x29a deleted the 0x29a/bb2970/add_post_ui branch August 30, 2021 11:14
@0x29a
Copy link
Contributor Author

0x29a commented Aug 30, 2021

@mehaknasir, @awais-ansari thank you very much for thorough review!

moonesque pushed a commit to edSPIRIT/frontend-app-discussions that referenced this pull request Nov 12, 2023
* Changes copied from Michael's PR

* Modifications for URL scheme

* renamed variable

* added prop type

* updated variable name

* fix(i18n): update translations

* added newline

* updated variable name

Co-authored-by: edX Transifex Bot <learner-engineering@edx.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blended PR is managed through 2U's blended developmnt program merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants