GithubHelp home page GithubHelp logo

bp-blocks's Introduction

BuddyPress

Unit Tests

Welcome to the BuddyPress development repository! This repository is a mirror of our development SVN repository. Please do not send pull requests here, instead submit patches to our SVN repository. Check out the Participate & contribute page of our Codex for information about how to open bug reports, contribute patches, test changes, write documentation, or get involved in any way you can.

Getting Started

BuddyPress is a WordPress plugin to power you community site. It is a PHP, MySQL, and JavaScript based project, and uses Node for its JavaScript dependencies. A local development environment is available to quickly get up and running.

You will need a basic understanding of how to use the command line on your computer. This will allow you to set up the local development environment, to start it and stop it when necessary, and to run the tests.

You will need Node and npm installed on your computer. Node is a JavaScript runtime used for developer tooling, and npm is the package manager included with Node. If you have a package manager installed for your operating system, setup can be as straightforward as:

  • macOS: brew install node
  • Windows: choco install node
  • Ubuntu: apt install nodejs npm

If you are not using a package manager, see the Node.js download page for installers and binaries.

You will also need Docker installed and running on your computer. Docker is the virtualization software that powers the local development environment. Docker can be installed just like any other regular application.

Development Environment Commands

Ensure Docker is running before using these commands.

To start the development environment for the first time

npm install
npm run wp-env start

Your WordPress community site will be accessible at http://localhost:8888. You can see configurations in the .wp-env.json file located at the root of the project directory. You can override these configurations using a .wp-env.override.json file located at the root of the project repository.

To stop the development environment

You can stop the environment when you're not using it to preserve your computer's power and resources:

npm run wp-env stop

To start the development environment again

Starting the environment again is a single command:

npm run wp-env start

Credentials

To login to the site, navigate to http://localhost:8888/wp-admin.

  • Username: admin
  • Password: password

To generate a new password (recommended):

  1. Go to the Dashboard
  2. Click the Users menu on the left
  3. Click the Edit link below the admin user
  4. Scroll down and click 'Generate password'. Either use this password (recommended) or change it, then click 'Update User'. If you use the generated password be sure to save it somewhere (password manager, etc).

bp-blocks's People

Contributors

dcavins avatar dependabot[bot] avatar imath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bp-blocks's Issues

Plugin Notice

The plugin should add a notice when BuddyPress is not installed.

Allow to give up on editing embed activity block

Looking at how the embed activity block is working currently, there is no way for a person to give up on after selecting to edit it.

Here are the UAT steps:

  • Create an embed activity block
  • Paste the URL of an activity
  • Click embed
  • Click Edit URL in the block toolbar
  • Now you can only add another, or the same, activity URL but you can't go back to the one before
  • If you reload the page, your previous activity is lost

Screen Shot 2020-09-13 at 2 56 23 PM

I looked at another embed, Twitter, and the behavior is more in line with that I'm thinking we should adopt here: that the previous URL is there in case the person gives up on changing it:

Screen Shot 2020-09-13 at 3 02 15 PM

Allow users to list & manage their activities in WP admin screen

We should improve this screen adding a view to see scheduled activities.

We should let users edit their activities from this screen as a start.

The Activity post form would replace the current Activity edit screen.

First stage of the activity post form should only make this new post form from the WP Admin context and let developers eventually add it on front end.

Migrate BP Widgets as BP Blocks

BuddyPress components widgets are:

Blogs

  • BP_Blogs_Recent_Posts_Widget: A list of recently published posts from across your network.

Core

  • BP_Core_Login_Widget: Show a Log In form to logged-out visitors, and a Log Out link to those who are logged in.

Friends

  • BP_Core_Friends_Widget: A dynamic list of recently active, popular, and newest Friends of the displayed member. Widget is only shown when viewing a member profile.

Groups

  • BP_Groups_Widget: A dynamic list of recently active, popular, newest, or alphabetical groups.

Members

  • BP_Core_Members_Widget: A dynamic list of recently active, popular, and newest members.
  • BP_Core_Recently_Active_Widget: Profile photos of recently active members.
  • BP_Core_Whos_Online_Widget: Profile photos of online users.

Messages

  • BP_Messages_Sitewide_Notices_Widget: Display Sitewide Notices posted by the site administrator.

BP Nouveau adds 2 other widgets:

Activity

  • BP_Latest_Activities: Display the latest updates of your community having the types of your choice.

Members

  • BP_Nouveau_Object_Nav_Widget: Displays BuddyPress primary nav in the sidebar of your site. Make sure to use it as the first widget of the sidebar and only once.

User profile block

This builds on from group block sketch in #2 and sees what a profile for user block could be. I can see this block being super useful for people and they even might want to call in from other sites (potentially in future).

image

It's following the same simple process:

  1. Placeholder to pick (we could do a smart default of existing user logged in).
  2. Presentation in secondary.

Migrate from Parcel to @wordpress/scripts (Webpack)

Parcel v2 is still not enabling the feature to globalize a library, although it was possible in v1. After looking at the @wordpress/scripts package I believe the extra work needed worth the switch. Let's migrate!

Errors when the groups component is not active

When the groups component is not active, we get an error when mounting the Sidebar component for the activity block editor. Mainly because of the endpoint: /buddypress/v1/groups/me?context=edit is not available when that component is not active.

We don't get any visual regression but we do get an error in the console and a 404 request to that endpoint.

Github Action: Node

Some of the things to test:

  • Audit node packages. npm audit
  • Make sure it builds without errors
  • run any test, if available

Allow an activity to be updated

Now it's possible for a user to schedule an activity, we need to let him edit activities.

We will probably need to have a convert action and when the content has no blocks.

Group block sketches

I began to think how the group block could work. I think staying simple makes sense here. A few points:

  1. Use placeholder to pick group: a simple step that other blocks use of the placeholder being a way to select (see navigation block ).
  2. The sidebar in v1 probably won't be used but could contain presentation (secondary) options that don't matter but could be nice. Worth noting it's important to not fill this up with multiple inputs the same like switches.

For the start of this I am keeping it super rough:

image

This block just displays the cover image and name of the group. I would like us to consider what the use is, for example, would we want to show invitations to join or maybe a click-through, or is it to also go as far as showing group activity? Maybe there are 2 blocks here, one for group profile and one for group activity?

Activity Embed block

The current output using the WP Block is not great, I believe it would be better to have our own block for it.

Add a new BP Core Block Component to replace Editor settings filter

So far we're filtering the block_editor_settings_all filter to include checks about whether a specific option or component is active. These settings are not available into the same store depending on the editor's type. If it's the Post Editor, then the store is 'core/editor', if it's the Widgets Block Editor then the store is 'core/block-editor'.

Moreover using these settings might be problematic if the BP Block is used from a Standalone App.

The goal of this task is to :

  • Create a new global block component
  • using a specific BP store
  • and making available equivalent PHP functions like the bp_is_active() into JavaScript.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.