Commit Graph

169 Commits

Author SHA1 Message Date
Denys Mishunov 371e1ed371 Always pre-select "Start a new merge request"
One exception: there is an existing MR for the current branch and the
branch is non-default and non-protected.

Extended mock_data for ide/stores to have different types of branches:
default, protected and regular

Cleaned new MR checkbox view
2019-08-22 23:23:06 +00:00
Denys Mishunov 4882303760 Fixed deletion of directories in Web IDE 2019-08-12 18:19:38 +02:00
Chris Toynbee 64a32d6cf0 Encapsulate file view modes with constants 2019-07-23 22:13:36 +00:00
Denys Mishunov cd638abbbf Fixed regression for re-naming files in WebIDE 2019-07-19 14:36:18 +02:00
Francisco Javier López 01685eed76 Added Usage Data for some Web IDE actions
The actions tracked in the web IDE are:
- creation of commits
- creation of merge requests
- projects loaded
2019-07-19 11:11:27 +00:00
Paul Slaughter d4cc92db09
FE remove create branch call in IDE commit
Previously `start_sha` was intercepted on the frontend to create the
correct branch in a separate API call. Now that the commits API supports
the `start_sha` parameter directly this workaround is not needed
anymore.
2019-07-18 09:19:18 +02:00
Denys Mishunov ff1a4a4241 Initiate editor for any file without content
Important to get file data for any file that has no content set yet: we
need this information in order to build a previe for changed/staged
files if they were not yet opened in the editor
2019-07-05 15:37:33 +02:00
Denys Mishunov 5a7834e5a9 Allow adding new entries to existing path
If an entry has been removed from the tree and later, during the same
session, a user is trying to add a new item with the same name/path we
should allow for that as long as the original entry is marked with
`deleted`.
2019-07-02 11:12:16 +00:00
Denys Mishunov f0fc535897 Re-name entries in one commit
Update window's URL after entry's re-name

Set proper hook for correct fileLanguage

Filtered out `moved` entries from the tree
2019-06-26 14:50:31 +00:00
Denys Mishunov 875cba9d99 Keep empty folders in the tree list
When removing the last file from a folder in WebIDE, do not remove the
folder from the view. We keep those to give users possibility to
re-upload files to the same folders.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60860
2019-06-25 12:32:35 +02:00
Paul Slaughter 894ad6f6e9
Fix IDE commit to use start_ref
**Why?**
The branch HEAD could be changed since the
IDE was opened. This leads to user's unintentionally
creating commits that overwrite other changes.

https://gitlab.com/gitlab-org/gitlab-ce/issues/59023
2019-06-17 14:04:35 -05:00
Paul Slaughter 1bafad515f
IDE trigger files change event
- On CMD+S when editor is focused
- On editor blur
- When file is created in tree
- When file is removed in tree
- When file is renamed in tree
2019-06-07 01:29:55 -05:00
Sam Bigelow bf8ab12433 Default MR checkbox to true in most cases
- Pull the new MR option out into it's own component
- Default MR checkbox to true when creating a new MR and committing to a
  branch that does not have an MR
- Still change the MR checkbox to false when a user is on a branch that
  already has an MR
- Hide MR option when on a branch that already has an MR and committing
  to current branch
- Don't default to true when committing directly to master
2019-06-06 00:12:21 -04:00
Denys Mishunov 0d7afb9561 Updated heading for default state in Web IDE
Resolves https://gitlab.com/gitlab-org/gitlab-ce/issues/60107
2019-05-29 12:13:27 +00:00
Paul Slaughter ee32e06f1f
Fix IDE get file data with '/' as relative root
https://gitlab.com/gitlab-org/gitlab-ce/issues/60932
2019-04-30 13:09:40 -05:00
Paul Slaughter 218430bdde
Create constants for IDE commit action values
**Why?**
These values will be used to help build the mirroring diff.
It is helpful keeping it controlled in a constant.

**Links:**
- https://gitlab.com/gitlab-org/gitlab-ee/issues/10232
- https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11478
2019-04-24 03:45:03 -05:00
Natalia Tepluhina 7dc2a7aa5b Revert "Increased page size to 100"
This reverts commit 2869a61f3b.
2019-04-23 07:42:58 +00:00
Phil Hughes 66699030ef Merge branch '57482-shortcut-to-create-merge-request-from-web-ide' into 'master'
Resolve "Shortcut to create merge request from Web IDE"

Closes #57482

See merge request gitlab-org/gitlab-ce!26792
2019-04-05 13:48:25 +00:00
Phil Hughes 9fb1dfa870 Merge branch '57668-create-file-from-url' into 'master'
Resolve "Support creating new file from URL in the Web IDE"

Closes #57668

See merge request gitlab-org/gitlab-ce!26622
2019-04-05 13:41:03 +00:00
Paul Slaughter 59ac0924da Fix IDE detecting MR from fork branch
**Why?**
Currently the IDE loads a merge request based on only the
`source_branch` name. This means it loads MR's from
forks that have the same branch name (not good).

- This required updating the BE API to accept `source_project_id`
2019-04-05 07:29:53 +00:00
Sam Bigelow 2571856fc5 Shortcut to create MR in web IDE
Before the user had to choose between committing to a new branch,
committing to a new branch AND creating an MR, or committing to the
current branch regardless of whether or not it already has an MR.

This commit separates the creation of an MR from whether or not they
commit to an existing or new branch
2019-04-04 12:08:35 -04:00
Paul Slaughter bd1122ee2f
Fix vue render error for IDE status bar
**What?**

A Vue warning that `ide_status_bar` sent a `Boolean` to a `String`
property (`img-src).

**What was the fix?**

Previously, `latestPipeline` could be one of the following values:

|          |        |
|----------|--------|
| `null`   | The pipeline hasn't loaded yet |
| `false`  | The pipeline has loaded, but nothing was returned. |
| `Object` | The piepline has loaded. |

Giving a semantic meaning to different falsey values hurts
maintainability. This commit fixes the above problem by removing the
`false` value and introducing a `hasLoadedPipeline` state property.
2019-04-04 10:00:44 -05:00
Denys Mishunov 5e0423ebc5 Set tree list accounting for already-opened files
Since we can create files from URL now, this means that these files will
not exist in the tree returned from API: they exist on the client
only before the first commit. In order to still show the newly-created
files in the tree, we should not override the tree, but merge the tree
existing on the client and the one coming from API.

Changelog entry

Moved trees merging into mutation
2019-04-04 09:05:50 +02:00
Denys Mishunov f6a038b38a Create a new file if URL references non-existent one 2019-04-04 09:05:50 +02:00
Tim Zallmann 4f0b2079de Upgraded Vue to 2.6.8
Upgrade to latest Version
2019-03-27 21:33:20 +00:00
Natalia Tepluhina a72241f4a9 Fixed commit logic to pick a branch
- fixed getter spec with correct getter name
2019-03-25 09:16:41 +00:00
Winnie Hellmann 514ee63826 Move some tests from Karma to Jest 2019-03-23 17:53:46 +01:00
Paul Slaughter c49d4a4985 Improve files_decorator performance
**How?**
Previously the files_decorator inserted parent folders inefficiently.
It started at the first part and ensured each was inserted.

Since the file entries are given to use in alphabetical order, we can
start at the last part of the blob's parents. If this exists, we can
short circuit and be done inserting parents.

**What else?**
- Improve performance of decorateData. The object spread operator is
not needed because the object is brand new.
2019-03-07 09:22:05 +00:00
Phil Hughes 1caa760f5d Merge branch '49663-branch-to-mr-connection' into 'master'
Link to the MR from current branch in Web IDE

Closes #49663

See merge request gitlab-org/gitlab-ce!25689
2019-03-05 08:43:44 +00:00
Denys Mishunov a1b0b3e4eb Extended Web IDE API to get MRs for a certain branch in a project
New `Api.projectMergeRequests` allows:
 - to query for all MRs on a project without specifying `mergeRequestId`
 - to filter the returned MRs using parameters from
 https://bit.ly/2H7We4V

 The new API request is used for fetching information about MRs
 associated with a particular branch in Web IDE to have IdeSidebar
 behave consistently in both scenarios:
 - getting to a branch from and MR (where we already have info about
 relevant MR), or
 - getting to a branch somehow differently directly

For cases where there are several merge requests that the current branch
is associated with, mark the most recent one as 'current'

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/49663
2019-03-04 18:10:55 +01:00
Natalia Tepluhina d9ba40aa04 Fixed mutation for root
- fixed test spec
- added warning only if file is deleted
2019-03-04 11:39:55 +00:00
Paul Slaughter 95c795de39 Resolve "Bug - Web Based IDE - The "Merge" Requests Selection displays Merge Requests from other projects" 2018-11-28 15:09:38 +00:00
Kushal Pandya 7002752d47 Merge branch 'fix-typos-occured' into 'master'
Fix typos occured to occurred

See merge request gitlab-org/gitlab-ce!23105
2018-11-22 14:02:52 +00:00
Takuya Noguchi e902f462c2 Eliminate duplicated words
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-11-22 01:01:23 +09:00
Hiroyuki Sato 692f87215d Merge remote-tracking branch 'origin/master' into fix-typos-occured
Conflicts:
- app/assets/javascripts/ide/stores/modules/pipelines/actions.js
- spec/javascripts/ide/stores/modules/pipelines/actions_spec.js
2018-11-21 11:58:52 +09:00
Phil Hughes b24316b2fe
Added a test for open merge request files 2018-11-20 15:11:33 +00:00
Phil Hughes ac8895b741
Open first 10 merge request files in IDE
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51635
2018-11-20 11:44:42 +00:00
jumpyoshim 75815769b0 Fix typo pipline to pipeline 2018-11-16 06:29:53 +09:00
Hiroyuki Sato b689b20f20 Fix typos occured to occurred 2018-11-16 00:34:24 +09:00
George Tsiolis e7763a58b5 Remove empty spec describe blocks 2018-10-18 19:02:55 +03:00
Mike Greiling f666026d71
Prettify all spec files 2018-10-17 11:18:17 -05:00
Johann Hubert Sonntagbauer 6f5723a169 enable jasmine/new-line-before-expect 2018-10-17 06:57:29 +02:00
Phil Hughes ff55aa7ebb
Fixed file templates not clearing in Web IDE
This fixes a bug where the file templates would not be cleared
after changing the template type.
Previously the templates would get pushed into the array
creating a list of templates for the different types.
This changes that by clearing the templates array
when the template type gets changed.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52487
2018-10-15 10:02:40 +01:00
Phil Hughes aac9d70a8c Merge branch 'ide-keep-right-pane-tabs-alive' into 'master'
Keep IDE RightPane views alive

See merge request gitlab-org/gitlab-ce!21980
2018-10-01 13:00:08 +00:00
Paul Slaughter adbf6149cf Keep IDE RightPane views alive
**Why?**
- This is needed for the Web Terminal feature.
  https://gitlab.com/gitlab-org/gitlab-ee/issues/5426

**Notes:**
- Introduces a `pane` Vuex module.
- Some views should not be kept alive (i.e. job details).
  This is why a `keepAlive` flag was introduced for views.
2018-09-28 15:03:39 -05:00
Phil Hughes 17735dc876
Fixed file templates not being fully fetched in Web IDE
Closes #51912
2018-09-28 19:12:45 +01:00
Phil Hughes feae897552
karma fixes 2018-09-07 11:28:03 +01:00
Phil Hughes 93e84c8f28
fixed tests 2018-09-07 11:28:02 +01:00
Phil Hughes c883b52686
renames file when template type is changed 2018-09-07 08:24:00 +01:00
Paul Slaughter 6bb0854257 Resolve "It's impossible to commit twice to the same branch" 2018-08-28 08:06:40 +00:00