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

BB-2886 [BD-03] [Authoring MFE] Implement forum tool selector #36

Conversation

aayushagrawal9
Copy link
Contributor

@aayushagrawal9 aayushagrawal9 commented Aug 18, 2020

Implement components for forum selection (See mockup: https://edx.invisionapp.com/console/share/XDXMC3XU9MR/420742421)
JIRA tickets: https://openedx.atlassian.net/browse/OSPR-4902

Dependencies: None

Screenshots: Screenshot_2020-10-06 Course Authoring edX
Screenshot_2020-10-06 Course Authoring edX(1)

Mockup: https://edx.invisionapp.com/console/share/XDXMC3XU9MR/420742421

Sandbox URL: TBD - sandbox is being provisioned.

Merge deadline: None

Author notes and concerns:

  1. This is a work in progress early PR

Reviewers

@openedx-webhooks openedx-webhooks added needs triage open-source-contribution PR author is not from Axim or 2U labels Aug 18, 2020
@openedx-webhooks
Copy link

openedx-webhooks commented Aug 18, 2020

Thanks for the pull request, @aayushagra! I've created BLENDED-550 to keep track of it in Jira.

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

@xitij2000
Copy link
Contributor

@aayushagra Could you add the [BD-03] tag to the title of this ticket, and make this a draft PR/ mark it as WIP.

@aayushagrawal9 aayushagrawal9 changed the title BB-2886 [Authoring MFE] Implement forum tool selector BB-2886 [BD-03] [Authoring MFE] Implement forum tool selector Aug 19, 2020
@openedx-webhooks openedx-webhooks added blended PR is managed through 2U's blended developmnt program and removed open-source-contribution PR author is not from Axim or 2U labels Aug 19, 2020
@aayushagrawal9 aayushagrawal9 changed the title BB-2886 [BD-03] [Authoring MFE] Implement forum tool selector [WIP] BB-2886 [BD-03] [Authoring MFE] Implement forum tool selector Aug 19, 2020
@aayushagrawal9 aayushagrawal9 marked this pull request as draft August 19, 2020 07:34
@aayushagrawal9 aayushagrawal9 changed the title [WIP] BB-2886 [BD-03] [Authoring MFE] Implement forum tool selector BB-2886 [BD-03] [Authoring MFE] Implement forum tool selector Aug 19, 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 needs a lot of changes and restructuring. I've left some comments that should guide you along the way.

todo Outdated Show resolved Hide resolved
Comment on lines 83 to 91
function chunk(arr, len) {
const chunks = [];
let i = 0;
const n = arr.length;
while (i < n) {
chunks.push(arr.slice(i, i += len));
}
return chunks;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xitij2000 Should this be moved elsewhere?

Lodash also has a chunk() function and lodash is already used by edx-platform so we can also use it here (Although it'll need to be added to package.json explicitly even though it's already installed otherwise the linter complains)

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 know why you need this at all? This is simply not part of the design? The view isn't paginated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xitij2000 Because we can only fit 3 in a row. If there's more than 3 entries we need this to render the three cards + the features table below those three cards. Unless I've got the UI wrong for how to handle more than 3 cards?

Right now it's 3 cards, table for those 3 cards, then 3 more cards and their table etc

Copy link
Contributor

Choose a reason for hiding this comment

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

You can handle that using scroll snaps as I mentioned in my ticket description: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type

You don't need javascript for this.

@aayushagrawal9 aayushagrawal9 marked this pull request as ready for review September 7, 2020 11:18
Comment on lines 83 to 91
function chunk(arr, len) {
const chunks = [];
let i = 0;
const n = arr.length;
while (i < n) {
chunks.push(arr.slice(i, i += len));
}
return chunks;
}
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 know why you need this at all? This is simply not part of the design? The view isn't paginated.

src/forum-tool-selector-settings/forum-card/ForumCard.jsx Outdated Show resolved Hide resolved
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 think there are still a lot of adjustments that can be made to get this closer to the mockup. I've suggested some.

src/discussion-tool-selector/DiscussionToolSelector.scss Outdated Show resolved Hide resolved
Comment on lines +36 to +49
const [selectedForumId, setSelectedForumId] = useState(null);

const onSelectForum = (forumId) => {
setSelectedForumId(forumId);
};

Copy link
Contributor

Choose a reason for hiding this comment

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

Note: this will be replaced with redux state later.

<tr>
<th>&nbsp;</th>
{forums.map(forum => (
<th className="text-center p-2" key={forum.forumId}>{forum.forumId}</th>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<th className="text-center p-2" key={forum.forumId}>{forum.forumId}</th>
<th className="text-center p-2" key={forum.forumId}><h5>{forum.forumId}</h5></th>

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 have a final few suggestions.

  • I tested this: tested on devstack. Checked that it matches the mockups, and forms the basis for upcoming work.
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation

@xitij2000
Copy link
Contributor

@aayushagra Please squash your commits down to one, and add UI screenshots to the ticket description.

@stvstnfrd This PR is adding components for the forum selector UI.

@aayushagrawal9
Copy link
Contributor Author

@xitij2000 I have squashed the commits & added screenshots

@davidjoy
Copy link
Contributor

davidjoy commented Jan 8, 2021

This was merged as part of #44. Woohoo! Closing.

@davidjoy
Copy link
Contributor

davidjoy commented Jan 8, 2021

@natabene and @marcotuts - while this PR was "rejected" cause I closed it, the code was actually accepted and merged via a different PR which I rebased this on. I don't know if we want to account for this in our records on OSPRs, but I thought I'd mention it since it's not the first time this has happened. I want to make sure credit is given where credit is due. :)

@natabene
Copy link

natabene commented Jan 9, 2021

@davidjoy Thanks for calling out, I defer to @marcotuts .

@xitij2000 xitij2000 deleted the aayush/add-forum-selector-tool branch August 12, 2021 04:04
PKulkoRaccoonGang pushed a commit to PKulkoRaccoonGang/frontend-app-course-authoring that referenced this pull request Aug 22, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 8, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 17, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 22, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 22, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 23, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 23, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 24, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 24, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Nov 27, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Dec 5, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Dec 5, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Dec 5, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Dec 5, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Dec 5, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
navinkarkera referenced this pull request in open-craft/frontend-app-course-authoring Dec 6, 2023
* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

feat: Course outline Status Bar (openedx#50)

* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: add checklist

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

* feat: [2u-259] add api, enable modal

* feat: [2u-259] add tests

* feat: [2u-259] add translates

* feat: [2u-271] fix transalates

* feat: [2u-281] fix isQuery pending, utils, hooks

* feat: [2u-281] fix useScrollToHashElement

* feat: [2u-271] fix imports

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

feat: Course Outline Reindex (openedx#55)

* feat: [2u-277] add alerts

* feat: [2u-277] add translates

* feat: [2u-277] fix tests

* fix: [2u-277] fix slice and hook

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

fix: Course outline tests (openedx#56)

* fix: fixed course outline status bar tests

* fix: fixed course outline status bar tests

* fix: fixed course outline enable highlights modal tests

* fix: enable modal tests

fix: increase code coverage on the page
KristinAoki pushed a commit that referenced this pull request Dec 6, 2023
* feat: Course outline Top level page (#36)

* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

feat: Course outline Status Bar (#50)

* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: add checklist

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

* feat: [2u-259] add api, enable modal

* feat: [2u-259] add tests

* feat: [2u-259] add translates

* feat: [2u-271] fix transalates

* feat: [2u-281] fix isQuery pending, utils, hooks

* feat: [2u-281] fix useScrollToHashElement

* feat: [2u-271] fix imports

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

feat: Course Outline Reindex (#55)

* feat: [2u-277] add alerts

* feat: [2u-277] add translates

* feat: [2u-277] fix tests

* fix: [2u-277] fix slice and hook

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

fix: Course outline tests (#56)

* fix: fixed course outline status bar tests

* fix: fixed course outline status bar tests

* fix: fixed course outline enable highlights modal tests

* fix: enable modal tests

fix: increase code coverage on the page

* refactor: improve course outline page

feat: lms live link

chore: update outline link

fix: course outline link

refactor: remove unnecessary css and rename test file

refactor: remove unnecessary css from outlineSidebar

test: make use of message variable instead of hardcoded text

refactor: remove unnecessary h5 class

test: use test id for detecting component

refactor: update course outline url and some default messages

---------

Co-authored-by: vladislavkeblysh <138868841+vladislavkeblysh@users.noreply.github.com>
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 rejected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants