Giter Club home page Giter Club logo

reactive-manual's Introduction

Reactive Manual

Note: ReactiveSearch Docs have moved to http://github.com/appbaseio/Docs. Any new PRs should be made over there.

Data-driven components for building Maps and Search UIs

Reactive Manual contains the docs for all the Reactive components from appbase.io including ReactiveSearch and ReactiveMaps.

Contributing

Prerequisites

  1. Git
  2. Node: install version 8.4 or greater
  3. Yarn: See Yarn website for installation instructions
  4. A clone of the repo on your local machine
  5. A fork of the repo (for any contributions)

Installation

  1. cd reactive-manual to go into the project root
  2. yarn to install the website's npm dependencies

Running locally

  1. yarn dev to start the hot-reloading development server (powered by Gatsby)
  2. open http://localhost:8000 to open the site in your favorite browser

Contributing

Create a branch

  1. git checkout master from any folder in your local reactive-manual repository
  2. git pull origin master to ensure you have the latest main code
  3. git checkout -b my-awesome-branch (replacing my-awesome-branch with a suitable name) to create a branch

Make the change

  1. Follow the "Running locally" instructions
  2. Save the files and check in the browser
  3. Changes to React components in src will hot-reload
  4. Changes to markdown files in content will hot-reload
  5. If working with plugins, you may need to remove the .cache directory and restart the server

Tips

  • For highlighting specific section of a code use the following format ```js{8-11}

Test the change

  1. If possible, test any visual changes in all latest versions of common browsers, on both desktop and mobile.
  2. Run yarn check-all from the project root. (This will run Prettier, ESLint, and Flow.)

Push it

  1. git add -A && git commit -m "My awesome message" (replacing My awesome message with a commit message, such as Fixed a really awesome bug with UI) to stage and commit your changes
  2. git push my-fork my-awesome-branch
  3. Go to the repo and you should see recently pushed branches.
  4. Follow GitHub's instructions.

Troubleshooting

  • yarn reset to clear the local cache

reactive-manual's People

Contributors

bietkul avatar dependabot[bot] avatar dhruvdutt avatar divyanshu013 avatar juliancthomas avatar jyash97 avatar lakhansamani avatar metagrover avatar siddharthlatest avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reactive-manual's Issues

Add Examples for Map Component

  • Add codepen to Syntax and Examples section
  • Add playground links.

Components:

  • PlacesSearch
  • GeoDistanceDropdown
  • GeoDistanceSlider
  • ReactiveMap

React-Native: Add Documentation

  • We need to create a version switcher for React Native. Using a different repo

  • Getting Started Section

    • Install and Quickstart
    • Import Data
    • ReactiveBase
    • Components Overview
  • Component References
    One doc per component

  • Advanced

    • Add a snack snippet for the ReactiveComponent doc.
    • Performance Tips @metagrover
    • Creating Themes, Styles Unsupported in current version

Change docs layout

Change docs navbar layout to match visually with the kind of components.

Proposed new layout:

  • Getting Started
    • Change components overview doc
  • ReactiveSearch Components
    • Base
      • Base components
    • List
      • List components
    • Range
      • Range components
    • Search
      • Search components
    • Result
      • Result components
  • Theming
  • Advanced
  • ReactiveMaps Components

    Same arrangement as before

Document v2 major changes and prop updates

Props Changes

  • customQuery: callback would receive the updated props in addition to the updated value. The function definition would be (value, props). Also allow for extending the use case by using useful props like fuzziness, fieldWeights directly in the callback to generate custom query.

  • componentId: we're using certain internal components which end with __internal. We should mention this. If the user sets this on a reactive component, the filter values and URL params won't be set for that component Not mentioning in docs

  • pagination: the issue with infinite loading in ReactiveList (native) is that there should be enough components to make the list scrollable. Need to think more on this subject

  • queryFormat: document the different date formats supported via this prop in date components

  • fieldWeights: the prop name changes for both weights and searchWeight

  • showFilter and filterLabel: will update only when the underlying query changes

  • queryFormat: will only update the query when there's a change in the selected items (eg -
    MultiList)

  • title: Remove title prop in actuators

  • range: prop is not optional

  • placeholder: remove placeholder prop in actuators

  • debounce: new prop for text input based components like TextField, DataSearch, CategorySearch

  • beforeValueChange: the components goes in a locked state when beforeValueChange is present so any changes to the component's state are ignored. beforeValueChange should be used with care since a long resolving function can block the user interaction with the component.

New Components

  • RangeInput: is a new component which extends the functionality of RangeSlider. Add docs for it.

  • ReactiveComponent: add docs

Components updates

  • NumberBox: accepts no props for filters. showFilter and filterLabel will not work therefore

  • RangeSlider: accepts no props for filters. showFilter and filterLabel will not work therefore

  • RangeSlider: provides a snap prop which uses the stepValue to snap the slider in position. Defaults to true. When set to false, the slider doesn't use the stepValue

  • SelectedFilters: update the docs

  • DatePicker: update the docs

  • DateRange: update the docs

  • SelectedFilters: props

  • ToggleButton: now expects a string or array in defaultSelected depending on multiSelect value

  • ReactiveList: onAllData prop update

Concepts

Theming

  • Theming concepts have changed, we now use a ThemeProvider from emotion which makes it easy to overwrite/add styles easily using ReactiveBase. Add docs related to these.

  • For extending component styles each component accepts an object which applies the provided className. Document the innerClass object for all components

  • Notes on specificity so the custom styles have higher preference. For ref - https://material-ui-next.com/customization/overrides/

  • Can we use withTheme from emotion for react components which are children of ReactiveBase?

Proxying

  • server request via a middleware

Final Review

  • Review all props with v2 code

Integrate CodeSandbox

The codepens are using v1. There are a lot of changes involved from v1 to v2 (including some breaking changes)

Integrate code sandbox for all components

ReactiveSearch component Docs Enhancements

  • CategorySearch should look and feel similar to DataSearch
  • Add the new props in all the components
  • Update the Extending section to include beforeValueChange
  • Proof read for any minor changes needed in intro section or prop definition section.
  • Ensure a Basic Usage section is present within the Usage section

Open playground links in new tab

Figure out a way to open playground links in new tab. Probably a solution would be while generating the html use a regex to add a target="_blank" rel="noopener noreferrer"

Missing docs

  • Streaming support

    • Update onAllData signature
    • Description about meta properties like _updated, _deleted
  • ReactiveBase

    • headers prop support with example

Improve streaming docs

The docs on streaming are not very clear about how streaming works in ReactiveSearch's context. For example, when would results update and when would streamResults update. Some examples would be helpful in understanding this concept with some recipes on handling CUD in the results components.

As a starting point, explaining a TODO app with CUD should suffice.

Update customQuery format

customQuery currently has a format like:

customQuery={
    function(value) {
      return {
        query: {
          match: {
            data_field: "this is a test"
          }
        }
      }
    }
  }

It should be updated to the following format (removing the surrounding query in the returned object):

customQuery={
    function(value) {
      return {
        match: {
            data_field: "this is a test"
        }
      }
    }
  }

Missing docs for ReactiveBase

  • ReactiveList: new prop scrollOnTarget it should be the reference of element or window object if user wants to set scroll on window ( appbaseio/reactivebase#104 )

  • Support weights prop in datasearch and in categorysearch (appbaseio/reactivebase#107)
    weights can be used to set the weights of fileds.
    It should be an array and should be in same order of appbaseField.

  • Pagination new prop: pages (appbaseio/reactivebase#111)
    Implement pages prop to change size of shown pages.

Reactivebase new component: `SelectedFilter`

SelectedFilter:

  • A component which can display selected values of other component and with each value there should be close button to clear selection of respective component.

Props:
componentId is required prop.

Restrict component:

By default all the components will be in selectedFilter but user should be able to prevent listing component in selectedFilter by using allowFilter prop.
allowFIlter by default it is true, set it to false to prevent listing in SelectedFilter

Getting Started: Improvements

Break down into sections:

  • Talk about how to set up the backend,
  • Talk about the dataset and mappings,
  • Talk about how to build the UIs,
  • Talk about how to deploy.

Link to an example with:

  • CRA,
  • Reactivesearch-starter-app.

Other:

  • Update the GIF being used.

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.