Commit Graph

82155 Commits

Author SHA1 Message Date
Open Source Bot
8599b361a9 Updating submodules
Summary:
GitHub commits:

4b750356d6
4f427e1305
f4c83b4fb3

Reviewed By: bigfootjon

fbshipit-source-id: 6ae021d38af723370b25ce7401d6e1689ea06c9d
2023-05-09 01:25:58 -07:00
Open Source Bot
e54dc7ea4c Updating submodules
Summary:
GitHub commits:

20fe4199e3
47d18fa8c5
a2cadf2506
a0ee40a3db

Reviewed By: bigfootjon

fbshipit-source-id: d8ab8fff0eb9cd9699a71341fa7e1743e4299a81
2023-05-08 18:07:30 -07:00
Evan Krause
9108e8d0ac Add "View changes" button to commit context menu
Summary: Right click a commit then choose "view changes" to open comparison view. This is actually really useful in my testing!

Reviewed By: quark-zju

Differential Revision: D45677198

fbshipit-source-id: 29e5fb2773e7f90c89febd2e71322f75d21da276
2023-05-08 17:56:46 -07:00
Evan Krause
3aac4827e0 Only wrap diff badges in small widths
Summary:
The old ISL showed diff badges next to commit titles, inline, with wrapping in responsive widths. This was a little annoying because things wrapped individually, and so it was scan visually since each commit was probably differently placed than the others.

We currently have been showing commit's diff information always in a second line below the commit. This makes it very consistent to find information, at the cost of vertical space. This makes ISL generally less information dense, which is not great.

Especially if you have a wide screen, this feels unnecessary.

The new approach in this diff is a sort of hybrid approach. Small screen widths will have ALL commits wrap their diff badge information onto a second line. This allows the title to wrap along side the buttons, which means buttons are in a much more consistent place on the right side, without jumping down.

On larger screens (800px), we don't wrap the diff badges, and everything is in one line. For extremely long titles, we also then allow text wrapping, but the buttons stay in place instead of wrapping.

After some testing, I actually think this system is a lot more natural feeling. Things generally stay in the place you expect them to be, and all diffs are consistent. The wrapping point at 800px is something we could adjust, but it feels about right in my testing.

One question: we could make this configurable with the old behavior, so we allow you to choose if you want to "always wrap" or "fill horizontal space".

But I think this new way is much nicer in general, so I don't think we need a config for it.

Also note that instead of using total screen width (e.g. with a CSS media query or a simple document.body.clientWidth), we actually watch the main content area and take its width instead. This allows us to be responsive respecting the commit info sidebar opening/closing,.

Reviewed By: quark-zju

Differential Revision: D45671035

fbshipit-source-id: 423b96c28b7e3fcd7faa5301d15f45b34a1ce2be
2023-05-08 17:49:00 -07:00
Open Source Bot
2f0eb4b235 Updating submodules
Summary:
GitHub commits:

f617c40419
da553547d4
ebe75b5062
a1ef0d7468

Reviewed By: bigfootjon

fbshipit-source-id: 4c38875b0d7368bd32d629c6de6daaa2a47afd6b
2023-05-08 17:19:44 -07:00
Pedro Rittner
53f1785ead Relax requirement that Scribe messages be valid UTF-8
Summary:
Outside of the HTTP endpoint specifically (which uses JSON), Scribe doesn't *actually* require the use of UTF-8 strings in its payloads.

To enable use cases that want to be able to offer non-UTF-8 messages into Scribe, the `ScribeClient` API has been changed to accept a more generic `&[u8]` instead of a strict `&str`.

Existing callsites that expected to only log UTF-8 strings now must enforce that at runtime or at their own API boundaries, which shouldn't be a problem in the scope of this codemod as that was (until now) enforced by the compiler.

Reviewed By: kuecks

Differential Revision: D45657053

fbshipit-source-id: bb08b02d3129e2cee895847c634fe9e809995f72
2023-05-08 17:03:41 -07:00
Open Source Bot
16614dbfa6 Updating submodules
Summary:
GitHub commits:

7551adaf88
0d85f40618
4a37a67b04
c485f1e815

Reviewed By: bigfootjon

fbshipit-source-id: 5842d0468f79e08acb51b5faabf102e79fe83467
2023-05-08 16:34:44 -07:00
Evan Krause
3913e7a1ab Don't query typeahead for one-char inputs
Summary:
The typeahead gives poor results when you only type one character, and those queries are much slower than two+ character queries.

Let's just limit our fetch to only happen for 2+ characters typed.

Some typeaheads even limit to 3+, but I think we can handle 2+.

Reviewed By: quark-zju

Differential Revision: D45665010

fbshipit-source-id: e4743550ee33352fd3a0cbe6f1df974513d1ec40
2023-05-08 15:30:28 -07:00
Evan Krause
5a54b96cff Reuse tooltip styling for typeahead
Summary: The suggestion typeahead was reimplementing the tooltip styles slightly, but didn't have the tooltip arrow. Might as well just use the tooltip styles directly instead by adding those classnames. It's not so complicated so I don't mind just re-adding the classnames.

Reviewed By: quark-zju

Differential Revision: D45664874

fbshipit-source-id: 5bfb1a98c0aa30dd3989911015493fe28fe273cf
2023-05-08 15:30:28 -07:00
Evan Krause
ecf4d8a182 Don't duplicate typeahead label and value if they're the same
Summary:
Small fix to make certain types of typeahead easier to read: if the "label" and "value" are the same, don't render the value as a `<Subtle>`.

Also, add a min-width so short tags in this format don't make the typeahead look really small

Reviewed By: quark-zju

Differential Revision: D45630154

fbshipit-source-id: 9bb24e9a678140cc574f9d46a7150c5d2c1f9fb6
2023-05-08 15:30:28 -07:00
Evan Krause
fb397f2937 Allow spaces in field typeahead
Summary: An oversight in how we extract tokens means that you couldn't type spaces in fields with typeahead.

Reviewed By: quark-zju

Differential Revision: D45629080

fbshipit-source-id: 17be7b635af96b096fdf9c214118b731892feb76
2023-05-08 15:30:28 -07:00
Evan Krause
cce751cd80 Fix rendering of long typeahead names and shrinking images
Summary:
My initial rendering didn't handle long names well, it would shrink the image and also overflow outside the typeahead box.

You see this especially with weird reviewer groups for "bad" searches.

Reviewed By: quark-zju

Differential Revision: D45627730

fbshipit-source-id: f18c77005b61d7e51a158318f9ee7b9e71b91cba
2023-05-08 15:30:28 -07:00
Evan Krause
6bc7d21687 Ignore older fetches after a newer one has come in
Summary:
Simple logic that throws out data fetches if we've already shown a newer one. This greatly reduces jumpiness in my testing.

A common situation is that in typing "evan", each keystroke is firing a query, and the "e" query obviously returns a lot more results, and thus takes a lot longer. the "ev" or even "eva" queries may come back faster due to having fewer results to return.

But if we've already gotten "eva" results, there's no use showing "e" results, they're always worse.

Reviewed By: quark-zju

Differential Revision: D45627732

fbshipit-source-id: 36f3251c2ecc134eefac906fa52908bdea3256eb
2023-05-08 15:30:28 -07:00
Evan Krause
10a427e591 Hide typeahead menu if field is not focused
Summary:
Simple way to ensure the typeahead field is not lingering and instead shows relevant info.

Note: onMouseDown comes before blur comes before onClick, so we need to use onMouseDown in order to register the click before the typeahead is hidden due to this new CSS.

Reviewed By: quark-zju

Differential Revision: D45627736

fbshipit-source-id: 4e97f295fc3fffae15b32253f6a95ad8dd12ac73
2023-05-08 15:30:28 -07:00
Evan Krause
061084252a 'x' button on tokens removes those tokens
Summary: Easy, just need to delete the given token

Reviewed By: quark-zju

Differential Revision: D45627743

fbshipit-source-id: b8456458d8d1021babb1de51df5eb33d8ffda1e8
2023-05-08 15:30:28 -07:00
Evan Krause
ceb1c3f87f Pressing delete deletes last token
Summary: Tokens should be deletable. If you press delete it should prioritize deleting the entered text, but if there is none, then it can delete the previous token entirely

Reviewed By: quark-zju

Differential Revision: D45627741

fbshipit-source-id: f89fb86551fd757749dd71d77ca21901f4e91043
2023-05-08 15:30:28 -07:00
Evan Krause
368c0fe0dd Don't show loading spinner if some suggestions already loaded
Summary:
Small thing, I noticed if result load and then you press more keys, it would show the loading spinner again briefly before the next results load.

It's much smoother if we only show the loading spinner before any results load

Reviewed By: quark-zju

Differential Revision: D45627734

fbshipit-source-id: 4cc5c049f158749dac81a3b12cab7cf94599ba75
2023-05-08 15:30:28 -07:00
Evan Krause
6444610506 insert token on enter or click
Summary: Actually insert selected tokens on Enter or click.

Reviewed By: quark-zju

Differential Revision: D45627737

fbshipit-source-id: 02d88bc61df102391cb1a25d458c98fc843f9135
2023-05-08 15:30:28 -07:00
Evan Krause
73bc2c3a31 Make typeahead results selectable
Summary: You should be able to arrow key up/down through typeahead results, and later click or press enter to add them. This diff just adds the selection UI but not confirming.

Reviewed By: quark-zju

Differential Revision: D45627731

fbshipit-source-id: 1b06b362ed340fdbadf8f78b6841eda9ec08a53d
2023-05-08 15:30:28 -07:00
Evan Krause
c08bc84796 Show user avatar in typeahead results
Summary: The old ISL only showed usernames, but it's a nice touch to show avatars as well. We get them "For free" in our query!

Reviewed By: quark-zju

Differential Revision: D45627733

fbshipit-source-id: 95958954f303879209ce511e139cfad09cbdf6d1
2023-05-08 15:30:28 -07:00
Evan Krause
7860d4ac1c Consolidate TypeaheadResult type
Summary: It seems I duplicated this type, let's consolidate

Reviewed By: quark-zju

Differential Revision: D45627744

fbshipit-source-id: 8c4dce13d91a39c3f0ca8b287a396be6e8f9a1f8
2023-05-08 15:30:28 -07:00
Evan Krause
7360b2c3b8 Setup typeahead api for server side code review provider
Summary: Making the API that each code review provider can use to define how to do their fields' autocomplete.

Reviewed By: quark-zju

Differential Revision: D45627738

fbshipit-source-id: 5e98a385164b614437b3eeb7fe5c12659ddfcde0
2023-05-08 15:30:28 -07:00
Evan Krause
185b0abd65 wire typeahead fetch to go to the isl server
Summary: Hook up our typeahead fetch function to send a message to the server. This is where we'll be able to actually do our fetches.

Reviewed By: quark-zju

Differential Revision: D45627740

fbshipit-source-id: d5426b84fb420f06e72e6f6f583577f63b1242d5
2023-05-08 15:30:28 -07:00
Evan Krause
44eba5acdf Rename autocomplete to typeahead
Summary:
"autocomplete" means a single *inline* suggestion, like ios / github copilot / gmail

"typeahead" means a dropdown list with several results as you type, which is what we want

Reviewed By: quark-zju

Differential Revision: D45627729

fbshipit-source-id: 76ac37116db7ccf3d0e584861163ab9d9e6e25d5
2023-05-08 15:30:28 -07:00
Evan Krause
14b78706b2 Add scaffolding for tokenization and autocomplete in commit info text fields
Summary:
We want to show a typeahead/autocomplete while you're typing reviewers / subscribers / tasks/ etc. This will need to fetch data and show a list of values, then let you accept the results.

To make this nicer, we also want to show the values as tokens, instead of just text. These visual tokens distinguishes values from each other, and lets you click on the x to dismiss them more easily.

This is just the first steps in building this UX. Remaining in further commits, we need to actually fetch the right data depending on the type of field, handle the data, insert suggestions, let you delete suggestions, and deal with focus / other subtleties.

Reviewed By: quark-zju

Differential Revision: D45627742

fbshipit-source-id: d9133c04291bf6165bdf4b7efc6c22330ef68afe
2023-05-08 15:30:28 -07:00
Evan Krause
384d4d22a1 Add CommitInfoTextField
Summary: Create a new field component for one-line fields which have typeahead support. This differs from the previous implementation, which was a multi-line thing

Reviewed By: quark-zju

Differential Revision: D45627739

fbshipit-source-id: 38294ac965ca2ec4e07b7aa23141e833b11c9951
2023-05-08 15:30:28 -07:00
Muir Manders
fc6d3225fd megarepo: trigger autopull for xrepo commit lookup
Summary:
Re-implement the xrepo lookup as a namespace to map xrepo commits to local commits, and an autopull predicate to pull the translated commit.

There are a couple subtle concerns:
1. We don't want to trigger any xrepo work for normal cases such autopulling a normal commit. To achieve that, made it possible to defer the generation of an autopull attempt. This way, the xrepo autopull can cancel itself if the revision in question was successfully pulled by a higher priority autopull predicate.
2. We don't to trigger an xrepo query in `repo["deadbeef"]` (i.e. in commitctx.__init__). This could have surprising performance implications. To achieve this, we only do the xrepo translation during the autopull step. Later, the namespace lookup will only use the cached translation result.

I also moved the behavior into an extension to separate it better.

Reviewed By: quark-zju

Differential Revision: D45537964

fbshipit-source-id: 602db5218c618132672c708edabf366615646600
2023-05-08 15:28:10 -07:00
Open Source Bot
666edb0e15 Updating submodules
Summary:
GitHub commits:

2e02a85825
5c114cc5df
ded3774e52
671afe5400
c838637543

Reviewed By: bigfootjon

fbshipit-source-id: 318a4337431b081bc6a7ca28fdca7cb03436a96e
2023-05-08 15:26:43 -07:00
Saul Gutierrez
fb07625c7e tests: fix flaky test_ancestors test
Summary: This test was flaky since a long time ago we made some changes to `drawdag`, which this diff fixes

Reviewed By: zzl0

Differential Revision: D45442022

fbshipit-source-id: 5a36a70f985d81c42f822f9933e0dc43d87cb591
2023-05-08 13:48:52 -07:00
Open Source Bot
c3343c8f56 Updating submodules
Summary:
GitHub commits:

7e84d65443
8cb0a5cf79
67e2332c78
8f763bdeab

Reviewed By: bigfootjon

fbshipit-source-id: d1f615beb70073eb1451ba071092d24e81264442
2023-05-08 13:47:29 -07:00
Open Source Bot
5e3a4462a4 Updating submodules
Summary:
GitHub commits:

d5dda55910
b492dbfb3e
0e10354566
c3a6918b72
736b3c4909
eb30aaa341
7294b12f31
7637f79616
9269c0d47f
2c179cdf8b
ffdb6d39f8
c51f34611c

Reviewed By: bigfootjon

fbshipit-source-id: 71f826456762e3f62db2e7bb24ab0f7518358fad
2023-05-08 13:06:51 -07:00
Zeyi (Rice) Fan
9f2cfe4af0 add shell completion for hg {hide,unhide,show}
Summary: I use these commands often but they don't have autocompletion.

Reviewed By: zzl0

Differential Revision: D45659357

fbshipit-source-id: 6f55324116cda45e159426f463974df175f9b25e
2023-05-08 12:55:33 -07:00
Open Source Bot
28a7e82ef2 Updating submodules
Summary:
GitHub commits:

00a1a00fb2
2ea3a5de0b
19ece52afe
d2db4f9146
38600c98ad
b92ce53a86
e32f91625c

Reviewed By: bigfootjon

fbshipit-source-id: 2e680fee253062b95ec1107df505ac69d7eb7554
2023-05-08 12:02:02 -07:00
Jun Wu
7b8032985e website: use consistent file name for curl and install
Summary:
strager pointed out the URL has `%2B` in it (so curl writes the file with the
`%2B` name) and the file name below uses `+`. Use `-o` with the desired file
names to avoid issues.

Reviewed By: muirdm

Differential Revision: D45620202

fbshipit-source-id: 27c9247fada2b702888d9f888c8e80c9e3e29a8d
2023-05-08 11:10:58 -07:00
Revathy Kasipandian
bcf9089209 Make Prjfs Tracebus Tracebus size configurable by EdenConfig
Summary: Make Prjfs Tracebus Tracebus size configurable by EdenConfig

Reviewed By: kmancini

Differential Revision: D45384455

fbshipit-source-id: 716ad44474db6e5cc1046829f0e0639e1da9771e
2023-05-08 11:04:48 -07:00
Chad Austin
0b877177b2 enable rpc tests on Windows
Summary: There's nothing unix-specific about these tests, so enable them on Windows.

Reviewed By: genevievehelsel

Differential Revision: D45586168

fbshipit-source-id: 5acbcbe81c5c03b16e43fc561762dbafb47696b8
2023-05-08 11:03:07 -07:00
Open Source Bot
d2b637de38 Updating submodules
Summary:
GitHub commits:

16f7689c38

Reviewed By: bigfootjon

fbshipit-source-id: 2d7f5845e603efb306065c97f96f1813b6ccd9c3
2023-05-08 10:58:03 -07:00
Mark Shroyer
fe7f58d5bf Error if user passes empty --config-dir to edenfsctl
Summary:
If a user relies on an environment variable in their invocation of edenfsctl,
e.g. `--config-dir=$EDEN_DEV_STATE`, then if the user accidentally leaves the
variable unset they may inadvertently specify an empty string as the path to
their config dir.

When running `edenfsctl stop`, the effect of an empty config dir path is to
shut down your main eden daemon instead of your dev daemon, so this has proven
a bit of a footgun.

Reviewed By: xavierd

Differential Revision: D45591968

fbshipit-source-id: 6df6eb8c05d94dafcaee1d6976a52310454a42d4
2023-05-08 10:36:51 -07:00
Evan Krause
7c10b5ddb9 Add tests for changing cwd
Summary:
Add some test cases making sure changing cwd resets states properly. I can definitely imagine edge cases here so this will be a good place for future tests as well.

Note that I had to invert the nesting of <Tooltip> and <VSCodeRadio> to make the test mocks happier, it doesn't really affect much.

Reviewed By: quark-zju

Differential Revision: D45615005

fbshipit-source-id: e1398aa8e5918c42115f4562dfba946d095ee49f
2023-05-08 09:48:40 -07:00
Evan Krause
befd510c25 Don't use eventemitter for cwd changes
Summary:
I noticed we had a million "possible EventEmitter memory leak detected. 11 listeners added" warnings in our tests, even though we disposed our event emitters correctly. That's because we legitimately had more than 10 subscribers to our cwd changing, which seems like way too low a limit.

I think it's better to just implement this "onChangeCwd" ourselves. This also may help us remove the eventemitter polyfill from the client side (it's actually a node thing, so webpack must be polyfilling it for us when we import it from events)

Reviewed By: quark-zju

Differential Revision: D45610780

fbshipit-source-id: e4fd994db4628975766b2faac2efc2b61009d004
2023-05-08 09:48:40 -07:00
Evan Krause
4207e39d9f Add clearOnCwdChange atom effect
Summary:
Some atoms in ISL should clear their state back to the default when the repository is changed. For example, the list of previous and queued operations. If your active repo is now a different repo, those operations aren't really comparable. So it's better for us to just hide them.

Here we introduce an atom that makes it easy to declaratively reset your atom state on repo change.

Reviewed By: quark-zju

Differential Revision: D45593018

fbshipit-source-id: ad3dd0eff875d54b1083d63ab8197a88e68a8f80
2023-05-08 09:48:40 -07:00
Evan Krause
12f02481cd Restart client subscriptions when the repository/cwd changes
Summary:
After the last diff, we now support changing your active repo/cwd.

This requires the client to forget most of its state—in a new repo, none of this would apply. This could have been quite difficult, but we were already basically set up to support this via serverApi.onConnectOrReconnect. A slight superset of this is the new serverApi.onSetup, which handles connect/reconnect, but also handles changes to the cwd/repo.

All our atoms which depend on server state will then automatically re-send their init message, which will then get a response pretty quickly with new info.

This seems to work well in my testing, though it's possible that for there to be some subtle bugs here.
Need to dig in a big to look for anything that might not be getting invalidated. For example, the last run command in the progress thing at the bottom does not get cleared when changing repos. Kind of a tradeoff here, because we'll lose your history of commands since it's not persisted anywhere. That's probably ok though, better have it consistent.

Reviewed By: quark-zju

Differential Revision: D45592101

fbshipit-source-id: 609a1cea64034175514764f39429cf711a491939
2023-05-08 09:48:40 -07:00
Evan Krause
77671843ad Handle changing cwd/repo in isl-server
Summary:
Now that we show a dropdown selector to change your repo, start handling the changeCwd message to actually update your repo.

This requires some slight restructuring. Instead of getting the repository reference in onClientConnection, we have ServerToClientApi know how to make repo references.

This is a slight inversion of control, but since we need repository reference creation to happen in response to messages from the client, it kind of makes sense to do it in ServerToClientAPI.

Reviewed By: quark-zju

Differential Revision: D45592197

fbshipit-source-id: cdc5f6ef63e608998b0e6483cf2b4454bce5065e
2023-05-08 09:48:40 -07:00
Evan Krause
bbf9af8fe9 Show available cwds in cwd selector dropdown
Summary:
Some platforms, like vscode, will allow you to change your cwd/repository among several options. In vscode, you may have multiple workspace folders. Each one should allow you to change your active directory.

We need to surface this list of options, based on vscode's mounted workspace folders, so you can click them to change the current repo.

This process will differ for each platform, although the UI can probably remain similar between them. So we hook this UI state up with platform-specific messages shared between client&server.

Reviewed By: quark-zju

Differential Revision: D45592198

fbshipit-source-id: 35a261370bc13f9feead3bbe9971f473c8701d13
2023-05-08 09:48:40 -07:00
Revathy Kasipandian
707879fc5c Do not hard-fail when edenrc is corrupted
Summary: Do not hard-fail when edenrc is corrupted

Reviewed By: xavierd

Differential Revision: D45550209

fbshipit-source-id: 88b5e7249a7da2ef4c6df69a4c65f08b7832d8d2
2023-05-08 08:23:03 -07:00
Open Source Bot
692c7e1198 Updating submodules
Summary:
GitHub commits:

b2785afbd4
500c975d44
b4a2017e58
23fc525f5a
f83f17fbd6

Reviewed By: jurajh-fb

fbshipit-source-id: f0706d9dd11c287ecf9ccc187448ba74dc9c6e44
2023-05-06 16:05:00 -07:00
Pierre Chevalier
888a60239a non-oss work 10/n
Differential Revision: D45600762

fbshipit-source-id: f802d2ae9a6296edc200b916374fbb1356395b44
2023-05-06 01:47:17 -07:00
Pierre Chevalier
6df12dbea7 non-oss work 9/n
Differential Revision: D45599777

fbshipit-source-id: c31fa8447c33b3a6f69f35986518708a22b064f1
2023-05-06 01:47:17 -07:00
Pierre Chevalier
ef92f5defe non-oss work 8/n
Differential Revision: D45599536

fbshipit-source-id: 7f0fb5262aeefbc56f6207037a66a2f4e3c68d03
2023-05-06 01:47:17 -07:00
Pierre Chevalier
9bba345d85 non-oss work 7/n
Differential Revision: D45599418

fbshipit-source-id: 4b81a03a9290884a2eb47760d4887dc53d5bc024
2023-05-06 01:47:17 -07:00