Rename SidebarSection to UISection

Summary: These are full width blocks, and can be put anywhere, so calling them SidebarSections isn't very helpful.

Reviewed By: danielbuechele

Differential Revision: D14833465

fbshipit-source-id: 2433337f78b6bbcb951cd90b6925de1b9a304d42
This commit is contained in:
John Knox
2019-04-09 08:21:23 -07:00
committed by Facebook Github Bot
parent 40b1c569ad
commit f21c9f1c61
4 changed files with 7 additions and 7 deletions

View File

@@ -2,11 +2,11 @@ package com.facebook.flipper.nativeplugins.components;
import com.facebook.flipper.core.FlipperObject; import com.facebook.flipper.core.FlipperObject;
public class JsonSidebarSection implements SidebarSection { public class JsonSection implements UISection {
private final String title; private final String title;
private final FlipperObject content; private final FlipperObject content;
public JsonSidebarSection(String title, FlipperObject content) { public JsonSection(String title, FlipperObject content) {
this.title = title; this.title = title;
this.content = content; this.content = content;
} }

View File

@@ -6,7 +6,7 @@ public class Sidebar {
private final FlipperArray.Builder sections = new FlipperArray.Builder(); private final FlipperArray.Builder sections = new FlipperArray.Builder();
public Sidebar addSection(SidebarSection section) { public Sidebar addSection(UISection section) {
sections.put(section.serialize()); sections.put(section.serialize());
return this; return this;
} }

View File

@@ -3,10 +3,10 @@ package com.facebook.flipper.nativeplugins.components;
import com.facebook.flipper.core.FlipperArray; import com.facebook.flipper.core.FlipperArray;
import com.facebook.flipper.core.FlipperObject; import com.facebook.flipper.core.FlipperObject;
public class ToolbarSidebarSection implements SidebarSection { public class ToolbarSection implements UISection {
FlipperArray.Builder items = new FlipperArray.Builder(); private FlipperArray.Builder items = new FlipperArray.Builder();
public ToolbarSidebarSection addLink(String label, String destination) { public ToolbarSection addLink(String label, String destination) {
items.put( items.put(
new FlipperObject.Builder() new FlipperObject.Builder()
.put("type", "link") .put("type", "link")

View File

@@ -2,7 +2,7 @@ package com.facebook.flipper.nativeplugins.components;
import com.facebook.flipper.core.FlipperObject; import com.facebook.flipper.core.FlipperObject;
interface SidebarSection { interface UISection {
FlipperObject serialize(); FlipperObject serialize();
} }