Skip to content

Commit

Permalink
Centerer [nfc]: Add TODO to delete
Browse files Browse the repository at this point in the history
And write in a code comment something we noticed in review of zulip#4868
("Centerer: Remove, as unnecessary") about how we might like
`Screen` to work.

With this, I plan to close zulip#4868. It's stale, and when looking
through my open PRs, it takes more attention than it deserves.
  • Loading branch information
chrisbobbe committed Feb 9, 2023
1 parent 49ed2ef commit b55d0b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/common/Centerer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ type Props = $ReadOnly<{|
* @prop children - Components to be centered.
* @prop [padding] - Specifies if the components should be padded.
*/
// TODO: Remove this component. Callers should be more transparent about
// what they want, especially if that includes setting things unrelated to
// centering, like `maxWidth: 480`.
export default class Centerer extends PureComponent<Props> {
static defaultProps: {| padding: boolean |} = {
padding: false,
Expand Down
2 changes: 2 additions & 0 deletions src/common/Screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export default function Screen(props: Props): Node {
centerContent: {
flexGrow: 1,
justifyContent: 'center',
// TODO: decide whether to add `alignItems: 'center'`:
// https://github.com/zulip/zulip-mobile/pull/4868#discussion_r665486501
},
padding: {
padding: 16,
Expand Down

0 comments on commit b55d0b3

Please sign in to comment.