Skip to content
This repository was archived by the owner on Jul 23, 2019. It is now read-only.

Commit 10721c3

Browse files
Nathan SoboMax Brunsfeld
Nathan Sobo
and
Max Brunsfeld
committed
Remove -Component suffix from components
We won't have much that isn't a component, so this makes things less verbose. Worst case we can put all the components in a folder. Co-authored-by: Max Brunsfeld <[email protected]>
1 parent 33ee77c commit 10721c3

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

xray_electron/lib/render_process/file_finder_component.js renamed to xray_electron/lib/render_process/file_finder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const React = require("react");
22
const $ = React.createElement;
33

4-
module.exports = class FileFinderComponent extends React.Component {
4+
module.exports = class FileFinder extends React.Component {
55
render() {
66
return $("div");
77
}

xray_electron/lib/render_process/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
process.env.NODE_ENV = "production";
22

33
const App = require("./app");
4-
const FileFinderComponent = require("./file_finder_component");
4+
const FileFinder = require("./file_finder");
55
const QueryString = require("querystring");
66
const React = require("react");
77
const ReactDOM = require("react-dom");
88
const ViewRegistry = require("./view_registry");
9-
const WorkspaceComponent = require("./workspace_component");
9+
const Workspace = require("./workspace");
1010
const XrayClient = require("../shared/xray_client");
1111
const $ = React.createElement;
1212

@@ -46,8 +46,8 @@ function buildViewRegistry(client) {
4646
client.sendMessage(action);
4747
}
4848
});
49-
viewRegistry.addComponent("Workspace", WorkspaceComponent);
50-
viewRegistry.addComponent("FileFinderView", FileFinderComponent);
49+
viewRegistry.addComponent("Workspace", Workspace);
50+
viewRegistry.addComponent("FileFinder", FileFinder);
5151
return viewRegistry;
5252
}
5353

xray_electron/lib/render_process/workspace_component.js renamed to xray_electron/lib/render_process/workspace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const ReactDOM = require("react-dom");
33
const View = require("./view");
44
const $ = React.createElement;
55

6-
module.exports = class WorkspaceComponent extends React.Component {
6+
module.exports = class Workspace extends React.Component {
77
render() {
88
const modalView =
99
this.props.modal == null ? null : $(View, { id: this.props.modal });

xray_server/src/workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl WorkspaceView {
100100
}
101101

102102
impl View for FileFinderView {
103-
fn component_name(&self) -> &'static str { "FileFinderView" }
103+
fn component_name(&self) -> &'static str { "FileFinder" }
104104

105105
fn render(&self) -> serde_json::Value {
106106
json!({

0 commit comments

Comments
 (0)