-
Notifications
You must be signed in to change notification settings - Fork 80
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
3box threads #2146
3box threads #2146
Conversation
7816280
to
e728d49
Compare
ecffc26
to
f404c9d
Compare
|
@@ -122,6 +123,7 @@ | |||
"i18next": "^19.6.3", | |||
"immutability-helper": "2.6.4", | |||
"interweave": "^11.1.0", | |||
"levelup": "^4.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this is used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
work-around for a 3box bug. before submitting this for review (note it is still a draft) I plan to check whether they have fixed the bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a query in with 3box to discover whether this work-around is still necessary
@@ -3,6 +3,7 @@ export const ETHDENVER_OPTIMIZATION = true; | |||
// if this is true, we do get the contractInfos from a locally stored file in ./data instead of from the subgraph | |||
export const USE_CONTRACTINFOS_CACHE = false; | |||
export const GRAPH_POLL_INTERVAL = 30000; | |||
export const THREEBOXTHREADSMODERATOR = "0xd50fc49ff389558d23a76Cf246dA147FF53D8Df8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it some private key? If so it should be as an ENV_VAR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, that is the address of the moderator, is meant to be public
remove the warning.. there is no need for alchemy 2 |
For me this is not a big deal either way. I chose the current behavior because 1) I am never comfortable deleting a user's data unless there is a really good reason, and 2) we don't have a way to edit comments once submitted. So to change a comment one has to delete and resubmit
Why? Red doesn't look very good in this color palette, and is a color that has a tendency to create tension. Since we prompt to confirm the deletion, I see no need for anything alarming.
I changed it to "Delete this comment...", which I think is needed so people know what will happen if they click it. The "..." is standard in computer UX to indicate that a further prompt will follow.
I don't agree with either suggestion, especially the button position. 1) this isn't a modal popup, and the width of the page is significantly great, 2) the user's eyes, typing from left to right with left-justified text, are always going to be biased to viewing the left side, 3) the grey button color matches the grey palette of the markdown component, thus helping the user to comfortably and intuitively parse the markdown component and the button as a functional group amidst the surrounding clutter.
I thought of that, however, Discus doesn't do it, google search doesn't do it, I feel that there are already plenty of visual cues enabling the user to comfortably parse the page without adding clutter to it.
This help button is our standard where ever we have the ability to compose markdown. I would not remove or change it unless we remove or change it everywhere, and that should be as a separate PR.
I only see a problem with the No button, so I removed the border. Otherwise these buttons appear the same way whenever we have a SimpleMessagePopup (which until now has only been with an OK button). If we want to improve it really ought to be a separate PR.
|
1c3cda6
to
bdf1e93
Compare
bdf1e93
to
c98408a
Compare
* Updated arc.js, test env and subgraph * join and quit --> join to match new arc.js * updated doc to Join instead of JoinAndQuit
* upgrade provider packages * update package-lock * remove webpack from dependencies * package-lock * lint * refactor, fix bugs * better console info on errors * clean up account profile loguc * remove unused webReducer stuff * merge conflict errors * added some i18next * upgrade provider packages * remove webpack from dependencies * package-lock * refactor, fix bugs * better console info on errors * clean up account profile loguc * merge conflict errors * added some i18next * package-lock * 3box fix for identity-wallet * fix bug in SAVE_THREEBOX * revert to 3box 1.20.3 * fix error in follow * remove Try Edit button * clean up canEdit logic * remove console.log statements * fix merge conflict * fix compile error * Update translation.json * update package-lock
update package-lock optimizations, upgrade 3box to 1.22.0 levelup update levelup to work-around 3box issue lots more functionality more good stuff more grooviness! add markdown ability improve error messages a bit help text, i18next fix update after new comment really fix new post subscription add delete post button compile error translations, tooltips fix logging out issues allow resizing of markdown editor conform prompt before deletion fetching spinner PR comments, remove Disqus from DAO landing page create ThreeBoxThreads component clone threads across the app
821ac45
to
384ccbf
Compare
<Tooltip placement="top" trigger={["hover"]} overlay={i18next.t(this.state.threeboxPosts?.length ? "Enable3BoxInteractions" : "CreateFirst3BoxPost")}> | ||
<a onClick={this.startDiscussion}>{i18next.t(this.state.threeboxPosts?.length ? "JoinTheConversation" : "StartAConversation")}{this.state.joiningThread ? <img className={css.loading} src="/assets/images/Icon/buttonLoadingWhite.gif" /> : ""}</a> | ||
</Tooltip> | ||
: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please not use the pattern of empty quotation marks? Instead you can use &&
, for example:
{ this.state.joinedThread && <div>your content</div> }
I find this empty quotation marks pattern confusing and I'm trying to eliminate this across Alchemy.
I would use the ternary operation only when I have something to show if the other condition met, otherwise &&
is much more cleaner.
Please change on the other places also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frankly I find your logic much more confusing because I have to understand how the boolean expression is evaluated left to right coupled with the fact that the boolean value of the <div> is totally irrelevant and that the final result of the whole expression is never actually evaluated, suggesting to me that some linters might complain and compilers/optimizers might motivated to remove the entire block. You are relying on a side effect which is not a good design pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further, asking me to change this logic risks creating bugs forcing me to test everything all over again. Would have been better to ask for this sort of thing in advance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On further reflection I realize that contrary to what I asserted above, the final result of the whole expression actually is evaluated, but again as an unusual side effect. But that realization doesn't much alter the fact that the expression has taken me a while to fully grok, a lot longer than the terniary, so I'm still not very compelled to agree that this is a simpler way of doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm just dense. Bottom line is I'd prefer not have to retest all this code for this late request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, react sucks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you beg me I'll do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK OK I did it in the one file, but I'll go on record as saying that for me the new logic is less intuitive/clear than terniaries.
And that react sucks in any case.
} | ||
|
||
a { | ||
color: #0071ff; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Global variable for color, I guess we already use this color in the globals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I updated 26 files with color variables I've used in this PR. No way I'm testing all that though...
Resolves: #1553
Note 3box does not have out-of-the-3box support for editing or replying to comments. We can implement those ourselves, but as a separate PR.