Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Feed Implementation #14

Open
wants to merge 71 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
ee9a0c7
initial event feed
itexpert120 Sep 5, 2023
f002f74
events: filters
itexpert120 Sep 5, 2023
3f1867f
test event click handler
itexpert120 Sep 6, 2023
e6d744a
Merge branch 'main' of https://github.com/near-everything/bos-workspace
itexpert120 Sep 6, 2023
4bbf7de
add event proposal
itexpert120 Sep 7, 2023
43dafd3
init app
elliotBraem Sep 10, 2023
8db6124
components moved over
elliotBraem Sep 10, 2023
eec6fc0
add comments
elliotBraem Sep 10, 2023
f5866a5
Add files via upload
Tajinderens Sep 10, 2023
87c7984
Add files via upload
Tajinderens Sep 10, 2023
290bd68
clean up
elliotBraem Sep 11, 2023
c3961c8
init landing page
elliotBraem Sep 11, 2023
da9a302
some editor changes & qol events changes
itexpert120 Sep 13, 2023
875097f
Merge branch 'main' of https://github.com/near-everything/bos-workspa…
itexpert120 Sep 13, 2023
d1780b3
editor and events changes
itexpert120 Sep 14, 2023
91814d1
editor: remove '(' from Editor.jsx
itexpert120 Sep 14, 2023
3c9996f
event card: fix ui
itexpert120 Sep 14, 2023
e37e479
feed: fix filters
itexpert120 Sep 14, 2023
37d28cf
organize home
elliotBraem Sep 14, 2023
4466e99
feat: create custom mobile calendar widget
itexpert120 Sep 15, 2023
52e4c41
fix top border
itexpert120 Sep 18, 2023
a9ad21e
init commit
elliotBraem Sep 12, 2023
bf54422
feature: adds community page
elliotBraem Sep 12, 2023
1de1e8d
feature: adds content
elliotBraem Sep 12, 2023
3494bd8
feature: feed primitive
elliotBraem Sep 12, 2023
8a8776f
feature: modular feed
elliotBraem Sep 12, 2023
b11e75d
wip
elliotBraem Sep 12, 2023
9dca41d
fix images and specific feeds
elliotBraem Sep 12, 2023
5ed9065
removes notification to self from join
elliotBraem Sep 12, 2023
d3f9a91
random uuid
elliotBraem Sep 12, 2023
e46381c
initializes projects
elliotBraem Sep 18, 2023
5ebaedc
initializes projects
elliotBraem Sep 18, 2023
046b020
feature: adds supporting tab
elliotBraem Sep 18, 2023
420a725
feature: DM Sans font
elliotBraem Sep 18, 2023
2153db1
fix: mapbox placing markers
elliotBraem Sep 18, 2023
f2c28cd
fix: clean routing
elliotBraem Sep 18, 2023
21376ee
fix: mapbox cleanup
elliotBraem Sep 18, 2023
f3375c3
feature: working map
elliotBraem Sep 19, 2023
04beb9c
feature: adds inspect
elliotBraem Sep 19, 2023
2171033
feature: adds random question
elliotBraem Sep 19, 2023
217654a
wip: dataflow
elliotBraem Sep 19, 2023
b9714dd
feature: initiatives
elliotBraem Sep 19, 2023
e6a923a
feature: initiatives
elliotBraem Sep 19, 2023
b31c923
feature: welcome page init
elliotBraem Sep 20, 2023
6ce2d5b
feature: fully working map
elliotBraem Sep 20, 2023
ced6da1
feature: welcome page
elliotBraem Sep 20, 2023
9118661
feature: projects
elliotBraem Sep 20, 2023
cc28901
feat: adds proposal
elliotBraem Sep 20, 2023
24596b1
formatting
elliotBraem Sep 20, 2023
179da92
convert to State.update
elliotBraem Sep 20, 2023
7bf2340
feature: dedicated website
elliotBraem Sep 21, 2023
f0f2d55
style: map buttons and borders
elliotBraem Sep 21, 2023
74c510f
add components library
itexpert120 Sep 21, 2023
5dcea30
fix: ComponentsLibrary width
itexpert120 Sep 21, 2023
cf4c6f4
update logo
elliotBraem Sep 21, 2023
6dda0f1
fix: Components Library Styles
itexpert120 Sep 21, 2023
a863b81
supporting
elliotBraem Sep 21, 2023
65eba75
feature: initiatives feed
elliotBraem Sep 21, 2023
c724ca9
fix mobile styles
itexpert120 Sep 21, 2023
fc9e2c4
fix wrong margin
itexpert120 Sep 21, 2023
8e1fa0e
feature: marker update
elliotBraem Sep 21, 2023
626b7fa
feature: logos for supporting
elliotBraem Sep 21, 2023
05ba656
working
elliotBraem Sep 21, 2023
a45a5dc
test and add gateway
itexpert120 Sep 21, 2023
fc2c509
create discover bos
itexpert120 Sep 25, 2023
b749bd1
feat: complete homepage selector
itexpert120 Sep 25, 2023
b666e71
feat: Create homepage
itexpert120 Sep 25, 2023
5968747
add project review
itexpert120 Sep 26, 2023
9b30616
draw app
elliotBraem Sep 26, 2023
fa7690f
Merge branch 'dev' of https://github.com/near-everything/bos-workspace
itexpert120 Sep 27, 2023
f5557f5
change default homepage
itexpert120 Sep 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/componentsView/bos.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"appAccount": "itexpert120-contra.near",
"aliases": {}
}

155 changes: 155 additions & 0 deletions apps/componentsView/widget/ComponentsLibrary.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
const componentsURL =
"https://raw.githubusercontent.com/NEARBuilders/BOSLibraries/main/library.json";

function loadComponents() {
const res = fetch(componentsURL);
return res.body && JSON.parse(res.body);
}

const componentList = loadComponents();
if (!componentList) {
return "⧗ Loading Components...";
}

State.init({
components: componentList,
});

const Sidebar = () => {
const sidebarDiv = styled.div`
min-width: 20%;
margin-right: 1.5rem;

@media (width < 786px) {
margin-right: 0;
}
`;

const sidebarButton = styled.div`
border: 1px solid #dee2e6;
padding: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rem;
margin-bottom: 0.5rem;
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
cursor: pointer;

transition: all 300ms;

&:hover {
background: rgba(0, 0, 0, 0.075);
}

&:active {
background: rgba(0, 0, 0, 0.5);
color: white;
}
`;

return (
<sidebarDiv>
<h2 className="mb-4">📚 Libraries</h2>
<div>
<sidebarButton
onClick={() => {
State.update({ components: componentList });
}}
>
All Components
</sidebarButton>
<hr />
{componentList.map((it) => (
<sidebarButton
onClick={() => {
const filterCategory = componentList.filter(
(cat) => cat.category === it.category
);
State.update({ components: filterCategory });
}}
>
{it.category}
</sidebarButton>
))}
</div>
<hr />
</sidebarDiv>
);
};

const componentView = ({ it }) => {
const categoryDiv = styled.div`
margin-bottom: 1rem;
`;

return (
<>
<categoryDiv key={`category-${it.id}`}>
<h5>{it.category}</h5>
<hr />
<div className="d-flex flex-column">
{it.components.map((comp) => (
<div className="mb-2">
<Widget
src="near/widget/ComponentCard"
props={{
src: `${comp.accountId}/widget/${comp.widgetName}`,
}}
/>
</div>
))}
</div>
</categoryDiv>
</>
);
};

const responsiveSidebar = styled.div`
display: flex;
flex-direction: row;

@media (width < 786px) {
flex-direction: column;
}
`;

const mainContent = styled.div`
flex: 1;
display: flex;
flex-direction: column;
width: 70%;
margin: 0 auto;

@media (width < 786px) {
width: 100%;
}
`;

return (
<div>
<responsiveSidebar>
<Sidebar />
<mainContent>
<div className="mb-4">
<h1>Component Libraries</h1>
<p className="lead">Libraries for building a better BOS.</p>

<div>
<Widget src="mob.near/widget/Editor.ComponentSearch" />
</div>
</div>
<div className="mb-4">
<h2>Libraries</h2>
<p className="text-body-secondary">
A curated list of common librairies grouped by categories.
</p>
</div>

{state.components.map((it) => (
<componentView it={it} />
))}
</mainContent>
</responsiveSidebar>
</div>
);
20 changes: 20 additions & 0 deletions apps/componentsView/widget/Gateway.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const gatewaysURL =
props.url ||
"https://raw.githubusercontent.com/itexpert120/bos-gateway/main/gateways.json";

function loadGateways() {
const res = fetch(gatewaysURL);
return res.body && JSON.parse(res.body);
}

const social = loadGateways();
if (!social) {
return "Loading Gateways...";
}

return (
<Widget
src="itexpert120-contra.near/widget/GatewayDirectory"
props={{ data: social }}
/>
);
Loading