Rethinking drag and drop – Alex Reardon – Medium

  • We at Atlassian have recently released react-beautiful-dnd which makes drag and drop for lists on the web more beautiful, natural and accessible.PhysicalityThe core design idea of react-beautiful-dnd is physicality: we want users to feel like they are moving physical objects around.
  • It’s drag and drop mechanism is fairly standard and serves as a good reference point.Movementinstant movement is standardWhen dragging items around, other items disappear and reappear as needed.
  • At no point is an item instantly moved anywhere — regardless of whether it is dragging or not.Knowing when to moveIt is quite common for drag and drop interactions to be based on the position that user started the drag fromimpact based on selection pointIn this example the user is grabbing the top…
  • Put another way: once the centre position of an item (A) goes over the edge of another item (B), B moves out of the way.AccessibleTraditionally drag and drop interactions have been exclusively a mouse or touch interaction.
  • We add a tab-index to draggable items to ensure that even you are not wrapping something that is usually interactive (such as a div) then the user will still be able to access it with their keyboard to drag it.Not for everyoneThere are a lot of libraries out there that allow…

We have recently released react-beautiful-dnd which makes drag and drop for lists on the web more beautiful, natural and accessible
Continue reading “Rethinking drag and drop – Alex Reardon – Medium”

contra/react-responsive — Media queries in react for responsive design #reactjs

contra/react-responsive 
 — Media queries in react for responsive design 

#reactjs

  • For a list of all possible shorthands and value types see numbers given as a shorthand will be expanded to px ( will become )

    You may also specify a function for the child of the MediaQuery component.

  • When the component renders, it is passed whether or not the given media query matches.
  • You may specify an optional property on the that indicates what component to wrap children with.
  • If the property is not defined and the has more than 1 child, a will be used as the “wrapper” component by default.
  • The values property can contain , , , , , , , , , , , and to be matched against the media query.

react-responsive – Media queries in react for responsive design
Continue reading “contra/react-responsive
— Media queries in react for responsive design

#reactjs”

django

Proper way of using url patterns  #angularjs #reactjs

  • The problem is that if I press f5 it’ll submit the form again, because of the URL is now different.
  • I’ve created a form which by submit uploads an item to the database.
  • Terrible sorry I wrote the wrong url in my url patterns.
  • def createItem(request): if request.method == ‘POST’: f = itemCreateForm(request.POST) if f.is_valid(): f.save() return HttpResponseRedirect(‘/homepage/CMS/’) else : form = itemCreateForm() context = { ‘form’ : form, ‘message’ : ‘Content Manage Site’ } return render(request, ‘CMS.html’, context)
  • def CMS(request): form = itemCreateForm() context = { ‘form’ : form, ‘message’ : ‘Content Manage Site’ } return render(request, ‘CMS.html’, context) def createItem(request): f = itemCreateForm(request.POST) if f.is_valid(): f.save() pass form = itemCreateForm() context = { ‘form’ : form, ‘message’ : ‘ItemCreated!’

I’ve created a form which by submit uploads an item to the database. The problem is that if I press f5 it’ll submit the form again, because of the URL is now different.
Continue reading “django”

React Native Tutorial: Create Dynamic Animated Lists

  • The answer is, because we only need _deleteItem() to simulate the removal process of an item by firing out the height animation on the actual list row component.
  • When the component is mounted, componentDidMount is fired as well as the animation using the Animated React Native component.
  • class DynamicListRow extends Component { // these values will need to be fixed either within the component or sent through props _defaultHeightValue = 60; _defaultTransition = 500; state = { _rowHeight : new Animated.
  • */ render() { return ( ); } /* For rendering the list rows we will use DynamicListRow component.
  • export default class DynamicList extends Component { /* Default state values */ state = { loading : true, dataSource : new ListView.

Read the full article, click here.


@ModusCreate: “”Would you like to add some visual sugar to your dynamic lists in #ReactNative?” #javascript”


Alex Lazar’s step-by-step guide to help you build your own dynamic animated ListView in React Native.


React Native Tutorial: Create Dynamic Animated Lists

Dynamic Animated Lists in React Native

POSTED: Tutorial to create dynamic animated lists in #ReactNative  #reactjs #javascript

  • The answer is, because we only need _deleteItem() to simulate the removal process of an item by firing out the height animation on the actual list row component.
  • When the component is mounted, componentDidMount is fired as well as the animation using the Animated React Native component.
  • class DynamicListRow extends Component { // these values will need to be fixed either within the component or sent through props _defaultHeightValue = 60; _defaultTransition = 500; state = { _rowHeight : new Animated.
  • */ render() { return ( ); } /* For rendering the list rows we will use DynamicListRow component.
  • export default class DynamicList extends Component { /* Default state values */ state = { loading : true, dataSource : new ListView.

Read the full article, click here.


@ModusCreate: “POSTED: Tutorial to create dynamic animated lists in #ReactNative #reactjs #javascript”


Alex Lazar’s tutorial to walk you through creating your own dynamic animated ListView in React Native.


Dynamic Animated Lists in React Native