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

Project creation #718

Merged

Conversation

yaya-mamoudou
Copy link
Contributor

@yaya-mamoudou yaya-mamoudou commented Jul 6, 2023

Summary

Redesign of Project creation.

Closes #557

Changes

  • Created the form to add a new project
  • Built a custom-rich text editor
  • Validated the form
  • Modified the project details page

Screenshots

image image image image image image

image

@yaya-mamoudou yaya-mamoudou self-assigned this Jul 6, 2023
@tuxology tuxology requested a review from kamthamc July 25, 2023 16:05
@tuxology
Copy link
Member

@kamthamc Requesting your code review. I am doing testing in parallel 🙏

Copy link

@chaitanya-cloudknox chaitanya-cloudknox left a comment

Choose a reason for hiding this comment

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

Mostly it looks good to me.

  • I think some of the files missing translations
  • I would suggest to access colors through theme and few places the colors are not being consumed from colors object
  • Remove commented code and console logs
  • And some minor comments

zubhub_backend/zubhub/creators/serializers.py Outdated Show resolved Hide resolved
@@ -1,4 +1,4 @@
printWidth: 80
printWidth: 120

Choose a reason for hiding this comment

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

FYI The recommended width is 80

Cc @tuxology

zubhub_frontend/zubhub/src/App.js Outdated Show resolved Hide resolved
borderRadius: 30,
color: colors.primary,
'&:hover': {
backgroundColor: '#00B8C4',

Choose a reason for hiding this comment

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

Please use colors/theme colors

Copy link
Member

Choose a reason for hiding this comment

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

We will merge the "theme" work #712 a bit later and rebase it. So we can avoid this for now

@@ -122,6 +125,11 @@ const styles = theme => ({
position: 'absolute!important',
width: '1px',
},
username: {
color: `${colors.white} !important`,

Choose a reason for hiding this comment

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

Try to avoid important flags, if not possible increase specificity.

zubhub_frontend/zubhub/src/components/Navbar/Navbar.jsx Outdated Show resolved Hide resolved
Comment on lines +25 to +31
if (multiple && value) {
let valueTemp = [];
(Array.isArray(value) ? value : [{ name: value }]).forEach(
item => Object.keys(item).length > 0 && valueTemp.push(item),
);
value = valueTemp;
}

Choose a reason for hiding this comment

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

May be move it to memo?

const handleFileChange = files => {
const maxAssets = 5;
if (files?.length > maxAssets || value?.length > maxAssets) {
alert('You can only select up to 7 files.');

Choose a reason for hiding this comment

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

missing translation?

@@ -0,0 +1,45 @@
import { colors } from "../../../assets/js/colors";

Choose a reason for hiding this comment

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

I would suggest to use colors through theme

@tuxology
Copy link
Member

tuxology commented Aug 4, 2023

Hey @yaya-mamoudou Have been testing this PR and noticing a few minor issues only! So listing them here. Good work on this 🎉
image

@tuxology
Copy link
Member

tuxology commented Aug 6, 2023

@yaya-mamoudou So we did a more thorough analysis on staging. Here are some blocker bugs, design and UX fixes that are needed. Most are quick and minor. We can't proceed with a merge unless those are resolved:

Text & Font changes

  • Change “Project” in “Share a few things about your Project” to “project”
  • Ensure that the placeholder text in all the fields are same font size and style.
  • Change the placeholder for “Share a few things about your project” to “Welcome to the enchanting world of……..science and nature!”
  • Change the text “too” in “What category does your project belong too?” to “to”.
  • Change the placeholder text “Paste your video link here”. Refer Faridah’s design.
  • Change of in “none of you are unsure..” to “if”
  • Make “General” bold in hashtag modal.
  • Change text “Start typing to search” to “Start typing to search #science"
  • Change text “Congratulations your project has successfully..” to “Congratulations your project has been successfully..”
  • In the project view page, add # to "Project Hashtag" buttons generated from above step

Design changes

  • Add more materials to the options for materials question. Refer Figma for remaining buttons. Change the spelling of “Masuring” to “Measuring”
  • Add the left and right arrows with carousel below the image thumbnails when lots of images are added while creating project. Currently they just reduce width and squeeze. Can you also increase the image thumbnails size? Refer to Faridah’s design to see the ratio of size.
  • Add a link button next to WhatsApp and Facebook in Congrats modal
  • Add keyword # in all keywords in hashtag modal. Refer to Faridah’s design. Eg. "+ #Clothing"
  • Remove the secondary blue navbar in preview page
  • In Project view, on Blue bar below project video - the clap and views show no count. Both in desktop and mobile mode, show the counts for clap and views. Views is not supposed to be clickable

Bugs

  • While editing a project, when you remove an uploaded video and instead try to add a link (e.g. a YouTube video link) and republish the project, the changes don’t get reflected on the project page. YouTube video doesn’t show up, the old video remains
  • When commenting on a project, JSON parse error shows up.
  • When you press clap and bookmark, it shows a JSON parse error message.
  • When you access a project in draft mode by clicking edit on it, the next button doesn’t work. It doesn’t take you to the next screen.
  • Video preview in the activity creation form should show in proper proportion (full width & height)
  • Once the project is created/saved as draft. After adding images, clicking next button, then previous button, adds lots of dummy images with wrong metadata. See screenshot below 👇

image

image

@tuxology tuxology merged commit 99c71a7 into unstructuredstudio:outreachy-yaya Aug 23, 2023
tuxology added a commit that referenced this pull request Aug 23, 2023
* Currently, the email gets displayed on the user profile.  (#714)

* Fixed issue with comment form submitting when empty

* Add validation of username when creating new creator to make sure username is not entered as an email

* Fixed issue with comment form submitting when empty

* -

* Wrap error string with translation method

* Project creation (#718)

* Fixed issue with comment form submitting when empty

* Add validation of username when creating new creator to make sure username is not entered as an email

* Fixed issue with comment form submitting when empty

* -

* Wrap error string with translation method

* Create project creation form and navigation layouts

* Fix form spacing and made banner fixed on mobile

* modify videoInput component so the user can only add either a video or a video link. Not both at the same time

* Create Rich text editor component

* -

* create project in steps and modified project details page

* +

* removed extra linear gradient on project details page

* add method to display the right message based on current step and create mode

* Add success dialog to project details page after successful project creation

* bypass validation of image and video fields when publish mode is draft

* Added modal

* Create modal component

* Add dialogs for step 3 for user to add tags

* Add confetti to successfull project creation dialog

* refactored the dropdown component to allow maximum selection when the multiple prop is set and also add checkboxes when the withCheckbox property is set

* Add query to exclude a project in the list of projects of a creator

* Add more projects to project details page

* +

* validate multiple categories

* refactor sidenav

* Add project mode selection page

* +

* Fix edit

* +

* Add correct links to sidenav and modified the styles of the associated pages

* Fixes

* Accept multiple categories in a project

* refactor sidenav

* Add project mode selection page

* +

* Fix edit

* +

* Add correct links to sidenav and modified the styles of the associated pages

* Fixes

* +

* Update multiple categories

* +

* Add comments in project details

* Add cat to draft and my projects empty page

* unauthorized user navbar and categories new ui

* remove publish without tags dialog when tags are available

* Add preview page

* +

* Add link preview

* Made preview project to render in a modal

* Make landing page visible to non logged in users

* Add old search bar

* Fixes on profile

* +

* +

* +

* fix grid on other projects for non logged in users

* Add create activity to sidenav for staff users

* remove commented code and some clogs

* fixes

* update email regex

* Text & Font & Design changes

* Fix

* input improvement

---------

Co-authored-by: Yaya Mamoudou <57509871+yaya-mamoudou@users.noreply.github.com>
iamhks pushed a commit to iamhks/zubhub that referenced this pull request Aug 25, 2023
* Currently, the email gets displayed on the user profile.  (unstructuredstudio#714)

* Fixed issue with comment form submitting when empty

* Add validation of username when creating new creator to make sure username is not entered as an email

* Fixed issue with comment form submitting when empty

* -

* Wrap error string with translation method

* Project creation (unstructuredstudio#718)

* Fixed issue with comment form submitting when empty

* Add validation of username when creating new creator to make sure username is not entered as an email

* Fixed issue with comment form submitting when empty

* -

* Wrap error string with translation method

* Create project creation form and navigation layouts

* Fix form spacing and made banner fixed on mobile

* modify videoInput component so the user can only add either a video or a video link. Not both at the same time

* Create Rich text editor component

* -

* create project in steps and modified project details page

* +

* removed extra linear gradient on project details page

* add method to display the right message based on current step and create mode

* Add success dialog to project details page after successful project creation

* bypass validation of image and video fields when publish mode is draft

* Added modal

* Create modal component

* Add dialogs for step 3 for user to add tags

* Add confetti to successfull project creation dialog

* refactored the dropdown component to allow maximum selection when the multiple prop is set and also add checkboxes when the withCheckbox property is set

* Add query to exclude a project in the list of projects of a creator

* Add more projects to project details page

* +

* validate multiple categories

* refactor sidenav

* Add project mode selection page

* +

* Fix edit

* +

* Add correct links to sidenav and modified the styles of the associated pages

* Fixes

* Accept multiple categories in a project

* refactor sidenav

* Add project mode selection page

* +

* Fix edit

* +

* Add correct links to sidenav and modified the styles of the associated pages

* Fixes

* +

* Update multiple categories

* +

* Add comments in project details

* Add cat to draft and my projects empty page

* unauthorized user navbar and categories new ui

* remove publish without tags dialog when tags are available

* Add preview page

* +

* Add link preview

* Made preview project to render in a modal

* Make landing page visible to non logged in users

* Add old search bar

* Fixes on profile

* +

* +

* +

* fix grid on other projects for non logged in users

* Add create activity to sidenav for staff users

* remove commented code and some clogs

* fixes

* update email regex

* Text & Font & Design changes

* Fix

* input improvement

---------

Co-authored-by: Yaya Mamoudou <57509871+yaya-mamoudou@users.noreply.github.com>
iamhks pushed a commit to iamhks/zubhub that referenced this pull request Aug 25, 2023
* Currently, the email gets displayed on the user profile.  (unstructuredstudio#714)

* Fixed issue with comment form submitting when empty

* Add validation of username when creating new creator to make sure username is not entered as an email

* Fixed issue with comment form submitting when empty

* -

* Wrap error string with translation method

* Project creation (unstructuredstudio#718)

* Fixed issue with comment form submitting when empty

* Add validation of username when creating new creator to make sure username is not entered as an email

* Fixed issue with comment form submitting when empty

* -

* Wrap error string with translation method

* Create project creation form and navigation layouts

* Fix form spacing and made banner fixed on mobile

* modify videoInput component so the user can only add either a video or a video link. Not both at the same time

* Create Rich text editor component

* -

* create project in steps and modified project details page

* +

* removed extra linear gradient on project details page

* add method to display the right message based on current step and create mode

* Add success dialog to project details page after successful project creation

* bypass validation of image and video fields when publish mode is draft

* Added modal

* Create modal component

* Add dialogs for step 3 for user to add tags

* Add confetti to successfull project creation dialog

* refactored the dropdown component to allow maximum selection when the multiple prop is set and also add checkboxes when the withCheckbox property is set

* Add query to exclude a project in the list of projects of a creator

* Add more projects to project details page

* +

* validate multiple categories

* refactor sidenav

* Add project mode selection page

* +

* Fix edit

* +

* Add correct links to sidenav and modified the styles of the associated pages

* Fixes

* Accept multiple categories in a project

* refactor sidenav

* Add project mode selection page

* +

* Fix edit

* +

* Add correct links to sidenav and modified the styles of the associated pages

* Fixes

* +

* Update multiple categories

* +

* Add comments in project details

* Add cat to draft and my projects empty page

* unauthorized user navbar and categories new ui

* remove publish without tags dialog when tags are available

* Add preview page

* +

* Add link preview

* Made preview project to render in a modal

* Make landing page visible to non logged in users

* Add old search bar

* Fixes on profile

* +

* +

* +

* fix grid on other projects for non logged in users

* Add create activity to sidenav for staff users

* remove commented code and some clogs

* fixes

* update email regex

* Text & Font & Design changes

* Fix

* input improvement

---------

Co-authored-by: Yaya Mamoudou <57509871+yaya-mamoudou@users.noreply.github.com>
tuxology added a commit that referenced this pull request Aug 25, 2023
* minor changes

* outline

* landing page changes

* some design changes

* call for testing

* Project creation overhaul and minor fix (#721)

* Currently, the email gets displayed on the user profile.  (#714)

* Fixed issue with comment form submitting when empty

* Add validation of username when creating new creator to make sure username is not entered as an email

* Fixed issue with comment form submitting when empty

* -

* Wrap error string with translation method

* Project creation (#718)

* Fixed issue with comment form submitting when empty

* Add validation of username when creating new creator to make sure username is not entered as an email

* Fixed issue with comment form submitting when empty

* -

* Wrap error string with translation method

* Create project creation form and navigation layouts

* Fix form spacing and made banner fixed on mobile

* modify videoInput component so the user can only add either a video or a video link. Not both at the same time

* Create Rich text editor component

* -

* create project in steps and modified project details page

* +

* removed extra linear gradient on project details page

* add method to display the right message based on current step and create mode

* Add success dialog to project details page after successful project creation

* bypass validation of image and video fields when publish mode is draft

* Added modal

* Create modal component

* Add dialogs for step 3 for user to add tags

* Add confetti to successfull project creation dialog

* refactored the dropdown component to allow maximum selection when the multiple prop is set and also add checkboxes when the withCheckbox property is set

* Add query to exclude a project in the list of projects of a creator

* Add more projects to project details page

* +

* validate multiple categories

* refactor sidenav

* Add project mode selection page

* +

* Fix edit

* +

* Add correct links to sidenav and modified the styles of the associated pages

* Fixes

* Accept multiple categories in a project

* refactor sidenav

* Add project mode selection page

* +

* Fix edit

* +

* Add correct links to sidenav and modified the styles of the associated pages

* Fixes

* +

* Update multiple categories

* +

* Add comments in project details

* Add cat to draft and my projects empty page

* unauthorized user navbar and categories new ui

* remove publish without tags dialog when tags are available

* Add preview page

* +

* Add link preview

* Made preview project to render in a modal

* Make landing page visible to non logged in users

* Add old search bar

* Fixes on profile

* +

* +

* +

* fix grid on other projects for non logged in users

* Add create activity to sidenav for staff users

* remove commented code and some clogs

* fixes

* update email regex

* Text & Font & Design changes

* Fix

* input improvement

---------

Co-authored-by: Yaya Mamoudou <57509871+yaya-mamoudou@users.noreply.github.com>

* minor changess

* outlinee

* landing page changess

* call for testingg

* rebase

* image and breadcrumb changes

---------

Co-authored-by: Suchakra Sharma <suchakra@unstructured.studio>
Co-authored-by: Yaya Mamoudou <57509871+yaya-mamoudou@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants