Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

feat: Add ability to create boards #33

Merged
merged 5 commits into from
Nov 17, 2019
Merged

feat: Add ability to create boards #33

merged 5 commits into from
Nov 17, 2019

Conversation

benox3
Copy link
Member

@benox3 benox3 commented Nov 11, 2019

Partially resolves #25 and resolves #22

  • Add ability to add

@benox3 benox3 self-assigned this Nov 11, 2019
@@ -1,5 +1,6 @@
import React from 'react';
import Box from '@material-ui/core/Box';
import * as S from './Boards.styles';
Copy link
Member

Choose a reason for hiding this comment

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

Do you think using the full name (like Styles) instead of S can help with readability?

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel like S is short and sweet.

describe('generateBoardName', () => {
beforeAll(() => {
MockDate.set('1/30/2000');
});
Copy link
Member

Choose a reason for hiding this comment

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

Nit: add newline

});
afterAll(() => {
MockDate.reset();
});
Copy link
Member

Choose a reason for hiding this comment

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

Nit: add newline

@@ -0,0 +1,9 @@
export default function() {
Copy link
Member

Choose a reason for hiding this comment

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

Is this redundant given BoardContainer.tsx?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean just leaving this in inline in board container? Can go either way on this one, not opinionated one way or another.

Copy link
Member

Choose a reason for hiding this comment

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

We can keep as is for now and if it makes sense to refactor later, we can do it


export default function(options?: { client?: typeof firebase }) {
const { firebase } = useContext(FirebaseContext);
const client = (options && options.client) || firebase;
Copy link
Member

Choose a reason for hiding this comment

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

Minor: you could also write as ternary (no need for change)

import { FirebaseContext } from '../../components/Firebase';
import { GroupType } from '../types';

export default function(options?: { client?: typeof firebase }) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we type the return value given that it's a Promise or is that inferred?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be inferred

@@ -0,0 +1,16 @@
import generateBoardName from './generateBoardName';
const MockDate = require('mockdate');
Copy link
Member

Choose a reason for hiding this comment

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

mockdate might not be that valuable since we can do it ourselves, but I think it's nice for convenience

Copy link
Member Author

Choose a reason for hiding this comment

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

That's why I added it 😄

@benox3 benox3 changed the base branch from feat/board-layout to master November 13, 2019 04:31
@remarkablemark
Copy link
Member

LGTM

@benox3 benox3 force-pushed the feat/create-boards branch from 2494845 to 85007c7 Compare November 17, 2019 17:16
@benox3 benox3 merged commit 3fb5a6a into master Nov 17, 2019
@benox3 benox3 deleted the feat/create-boards branch November 17, 2019 17:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a participant, I can update the Board Name and delete a Board As a moderator, I can create a board.
2 participants